Changeset b078a42 in mainline


Ignore:
Timestamp:
2012-07-23T16:15:40Z (12 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
da287d1
Parents:
1008064
Message:

it is imperative that the _size_ of the allocated block is at least BASE_ALIGN-aligned
(because the tail structure needs to be placed on a naturally aligned address, otherwise we hit unaligned memory access on platforms which are less forgiving)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/malloc.c

    r1008064 rb078a42  
    712712                return NULL;
    713713
    714         size_t gross_size = GROSS_SIZE(size);
     714        size_t gross_size = GROSS_SIZE(ALIGN_UP(size, BASE_ALIGN));
    715715       
    716716        heap_block_head_t *split;
Note: See TracChangeset for help on using the changeset viewer.