about summary refs log tree commit diff
path: root/src/malloc/malloc.c
Commit message (Collapse)AuthorAgeFilesLines
* namespace fixes for sys/mman.hRich Felker2011-04-201-0/+1
|
* fix rare but nasty under-allocation bug in malloc with large requestsRich Felker2011-04-041-1/+1
| | | | | | | | | the bug appeared only with requests roughly 2*sizeof(size_t) to 4*sizeof(size_t) bytes smaller than a multiple of the page size, and only for requests large enough to be serviced by mmap instead of the normal heap. it was only ever observed on 64-bit machines but presumably could also affect 32-bit (albeit with a smaller window of opportunity).
* avoid over-allocation of brk on first mallocRich Felker2011-04-011-4/+4
| | | | | | | if init_malloc returns positive (successful first init), malloc will retry getting a chunk from the free bins rather than expanding the heap again. also pass init_malloc a hint for the size of the initial allocation.
* very cheap double-free checks in mallocRich Felker2011-03-231-0/+4
|
* make malloc(0) return unique pointers rather than NULLRich Felker2011-02-201-5/+9
| | | | | | | this change is made with some reluctance, but i think it's for the best. correct programs must handle either behavior, so there is little advantage to having malloc(0) return NULL. and i managed to actually make the malloc code slightly smaller with this change.
* initial check-in, version 0.5.0 v0.5.0Rich Felker2011-02-121-0/+515