summaryrefslogtreecommitdiffstats
path: root/lib/libc/stdlib/malloc.c
AgeCommit message (Expand)AuthorFilesLines
2019-06-28When system calls indicate an error they return -1, not some arbitraryderaadt1-2/+2
2019-05-23Only override size of chunk if we're not given the actual length.otto1-2/+3
2019-05-10Inroduce malloc_conceal() and calloc_conceal(). Similar to theirotto1-194/+191
2019-01-10Move default numer of pools in the multi-threaded case to 8. Various testsotto1-2/+2
2019-01-10Make the "not my pool" searching loop a tiny bit smarter, whileotto1-20/+37
2018-12-10Improve speed for the multi-threaded case by reducing lock contention.otto1-30/+21
2018-12-09style; OK ottoflorian1-3/+3
2018-11-27Refactor "find the right pool" code into a function. ok djm@ tb@otto1-65/+34
2018-11-21Introducing malloc_usable_size() was a mistake. While some otherotto1-78/+1
2018-11-19Fix compilation on alpha, where DEF_WEAK() really must be paired withguenther1-2/+1
2018-11-18Implement malloc_usable_size(); ok millert@ deraadt@ and jmc@ for the man pageotto1-1/+79
2018-11-06Use the new vm.malloc_conf sysctl; ok millert@ deraadt@otto1-6/+11
2018-11-05Implement C11's aligned_alloc(3). ok guenther@otto1-1/+43
2018-04-07sys/uio.h is not used anymoreotto1-3/+2
2018-03-30fix MALLOC_STATS; spotted by and ok semarie@otto1-1/+5
2018-03-06use _ALIGN() which is uhm a bit OpenBSD-specific, but it means wederaadt1-3/+2
2018-03-05Use _MAX_PAGE_SHIFT, rather than #ifdef mips64deraadt1-6/+2
2018-02-07use consistent style for for loop in unmap(), no functional changeotto1-4/+2
2018-01-30keep in sync with ld.so malloc.cotto1-2/+3
2018-01-28- An error in the multithreaded case could print the wrong function nameotto1-12/+23
2018-01-26- do not junk pages returned by free_bytes(), all freed chunks are alreadyotto1-19/+19
2018-01-18Zap the rotor, it was a wrong idea. Cluebat applied by kshe whootto1-6/+3
2018-01-18Move to ffs(3) for bitmask scanning. I played with this earlier,otto1-21/+11
2018-01-08optimization and some cleanup; mostly from kshe (except the unmap() part)otto1-67/+51
2018-01-01Only init chunk_info once, plus some moving of code to group related functions.otto1-273/+267
2017-12-27step one in avoiding unneccesary init of chunk_info;otto1-65/+81
2017-11-02's' should include 'f'; from Jacqueline Jolicoeurotto1-2/+2
2017-10-19Restore a return that was inadvertently removed from freezero() in r1.234,jsing1-1/+2
2017-10-05do not return f() where f is a void function; loop var type fixotto1-4/+5
2017-10-05Use dprintf instead of snprintf/writeotto1-82/+36
2017-09-23Make delayed free non-optional and make F do an extensive double free check.otto1-20/+25
2017-09-12mapalign returns MAP_FAILED for failuer; from George Koehlerotto1-2/+2
2017-09-11check double free before canary for chunks; ok millert@otto1-5/+5
2017-08-20two MALLOC_STATS only tweaks; one from David CARLIER, the other found by clangotto1-8/+4
2017-07-10one more instance of the previous commit; also initialize ->offset to aotto1-2/+3
2017-07-07Only access offset if canaries are enabled *and* size > 0, otherwise offsetotto1-2/+2
2017-06-19port the RBT code to userland by making it part of libc.dlg1-10/+11
2017-05-13- fix bug wrt posix_memalign(3) of blocks between half a page and a pageotto1-4/+9
2017-04-22For small allocations (chunk) freezero only validates the givenotto1-5/+10
2017-04-18don't forget to fill in canary bytes for posix_memalign(3); reported byotto1-1/+4
2017-04-17whitespace fixesotto1-14/+14
2017-04-13allow clearing less than allocated and document freezero(3) betterotto1-5/+5
2017-04-10Introducing freezero(3) a version of free that guarantees the processotto1-12/+72
2017-04-06first print size in meta-data then supplied arg size when an inconsistency isotto1-3/+3
2017-03-28small cleanup & optimization; ok deraadt@ millert@otto1-2/+5
2017-03-24add a helper function to print all pools #ifdef MALLOC_STATSotto1-1/+16
2017-03-24move recallocarray to malloc.c andotto1-17/+206
2017-02-15Add a NULL test to wrterror() to avoid a NULL deref when called from ajsg1-2/+2
2017-02-02fix a comment and rm some dead code as a result of the previous diffotto1-8/+5
2017-02-01Let realloc handle and produce moved pointers for allocations betweenotto1-20/+37