summaryrefslogtreecommitdiff
path: root/src/malloc/aligned_alloc.c
AgeCommit message (Collapse)AuthorLines
2013-07-04move alignment check from aligned_alloc to posix_memalignRich Felker-1/+1
C11 has no requirement that the alignment be a multiple of sizeof(void*), and in fact seems to require any "valid alignment supported by the implementation" to work. since the alignment of char is 1 and thus a valid alignment, an alignment argument of 1 should be accepted.
2012-12-06fix invalid read in aligned_allocRich Felker-2/+3
in case of mmap-obtained chunks, end points past the end of the mapping and reading it may fault. since the value is not needed until after the conditional, move the access to prevent invalid reads.
2012-08-25implement "low hanging fruit" from C11Rich Felker-0/+51
based on Gregor's patch sent to the list. includes: - stdalign.h - removing gets in C11 mode - adding aligned_alloc and adjusting other functions to use it - adding 'x' flag to fopen for exclusive mode