summaryrefslogtreecommitdiff
path: root/lib/libc/stdlib/malloc.c
AgeCommit message (Expand)Author
2012-12-22Fix bug in random offset introduced in rev 1.143; random range wasOtto Moerbeek
2012-11-02Add a new malloc option 'U' => "Free unmap" that does the guarding/Damien Miller
2012-09-13Fix precedence bug (& has lower precedence than !=).Paul Irofti
2012-07-09use PAGE_SHIFT instead of PGSHIFT, in preperation for futureTheo de Raadt
2012-06-26after a talk with ariane, use MAP_FIXED for mquery to avoid the cost ofTed Unangst
2012-06-22two changes which should improve realloc. first, fix zapcacheregion toTed Unangst
2012-06-20two small fixes to free page cache. first, we need two nibbles of randomTed Unangst
2012-06-18Support larger-than-page-alignment requests in posix_memalign() byMatthew Dempsky
2012-02-29- Test for the retrieved page address not being NULL. This turns free((void*)1)Otto Moerbeek
2011-10-06Make struct chunk_info a variable sized struct, wasting lessOtto Moerbeek
2011-07-12on malloc flag S, set cache size to 0; will catch even moreOtto Moerbeek
2011-06-20as man page states, lower case undoes upper case. add support for little s,Ted Unangst
2011-05-20save errno dance in wrterror() and malloc_dump(); prompted by and ok deraadt@Otto Moerbeek
2011-05-18introduce symbolic constant for initial number of regionsOtto Moerbeek
2011-05-18zap regions_bits and rework MALLOC_MAXSHIFT a bit; ok djm@Otto Moerbeek
2011-05-12Avoid fp computations for stats, this make calling malloc_dump() safe in moreOtto Moerbeek
2011-05-12fix comment, the bitmap is an array of u_short nowOtto Moerbeek
2011-05-12Introduce leak detection code for MALLOC_STATSOtto Moerbeek
2011-05-08Move MALLOC_STATS code to bottom of file, so the real stuff is more at the top.Otto Moerbeek
2011-05-05Up until now, malloc scanned the bits of the chunk bitmap fromOtto Moerbeek
2011-04-30Now that we use an array of u_short for the chunk bitmap change a fewOtto Moerbeek
2011-04-30More efficient scanning for free chunks while not losing any randomization;Otto Moerbeek
2010-12-16avoid pointer arithmetic on void *David Hill
2010-10-21print the pointer value that caused the error (if available); okOtto Moerbeek
2010-05-18add posix_madvise, posix_memalign, strndup, and strnlen. mostly fromTed Unangst
2010-01-13New options 'S', as a shorthand for the options most suitable as anOtto Moerbeek
2009-12-16save calls to arc4random() by using a nibble at a time; not becauseOtto Moerbeek
2009-12-07Make userland malloc use __LDPGSZ granularity on mips, regardless of theMiod Vallat
2009-11-27Switch the chunk_info lists to doubly-linked lists and use the queueOtto Moerbeek
2009-11-27Don't forget to fill region from the cache with junk if needed in one case;Otto Moerbeek
2009-11-27No need to clear a mmapped region; from Fabien Romano and JonathanOtto Moerbeek
2009-11-02permit -DMALLOC_STATS to compile againTodd T. Fries
2009-10-20Check mmap return value against MAP_FAILED not NULL.Paul Irofti
2009-06-08quieten compiler by converting pointers to uintptr_t before truncating themTheo de Raadt
2009-01-03reintroduce extra malloc protections, but avoiding the use ofDamien Miller
2008-12-31PAGE_SIZE is not a valid symbol to use in that way. In particular,Theo de Raadt
2008-12-30Remove mprotecting of struct dir_info introduced in previous commitDamien Miller
2008-12-29extra paranoia for malloc(3):Damien Miller
2008-12-15shave off more bytes than you expect by declaring a few const local arraysOtto Moerbeek
2008-11-20move allocations between half a page and a page as close to the end ofOtto Moerbeek
2008-11-20Reduce the leeway malloc allows when moving allocations to the end ofOtto Moerbeek
2008-11-13To allow for easier playing with more strict settings introduceOtto Moerbeek
2008-11-12avoid a few strlen calls for constant strings; prompted by tg; ok djm@Otto Moerbeek
2008-11-06if the freeprot flag (F) is set, do not do delayed frees for chunksOtto Moerbeek
2008-11-02remove distinction between warnings and errors, ok deraadt@ djm@Otto Moerbeek
2008-10-29if MALLOC_STATS is defined, record how many "cheap reallocs" wereOtto Moerbeek
2008-10-20oops, assign errno the right way. caught by david running regress testsOtto Moerbeek
2008-10-03reduce rbyte cache to 512 bytes, no measurable slowdown (even in theOtto Moerbeek
2008-10-03save and restore errno on success. while it is not stricly needed forOtto Moerbeek
2008-10-03when increasing the size of a larger than a page allocation tryOtto Moerbeek