• Philippe Gerum's avatar
    copperplate/heapmem: fix private heap inits · 903b21fe
    Philippe Gerum authored
    This is a general fix for properly initializing private copperplate
    heaps managed by the heapmem allocator:
    
    - the heapmem descriptor must be allocated separately, not to consume
      space from the heap memory. At this chance, heapmem_init() must be
      given the right descriptor address, not NULL.
    
    - heaps must account for the size of the meta data the allocator
      needs. Make sure to allocate this extra-space when no specific heap
      memory has been given.
    
    - upon array allocation, align the item size used in calculating the
      overall heap size on the next power-of-two boundary, so that the
      required number of items can be obtained from the pool (as the
      caller may rightfully assume).
    
    Without these changes, the private copperplate allocator simply cannot
    work on top of heapmem, so keep them grouped.
    Signed-off-by: Philippe Gerum's avatarPhilippe Gerum <rpm@xenomai.org>
    Signed-off-by: Jan Kiszka's avatarJan Kiszka <jan.kiszka@siemens.com>
    903b21fe
Name
Last commit
Last update
config Loading commit data...
debian Loading commit data...
demo Loading commit data...
doc Loading commit data...
include Loading commit data...
kernel Loading commit data...
lib Loading commit data...
scripts Loading commit data...
testsuite Loading commit data...
utils Loading commit data...
.gitignore Loading commit data...
CONTRIBUTING.md Loading commit data...
Makefile.am Loading commit data...
README Loading commit data...
configure.ac Loading commit data...