Age | Commit message (Collapse) | Author | |
---|---|---|---|
2018-03-05 | Use _MAX_PAGE_SHIFT, rather than #ifdef mips64 | Theo de Raadt | |
ok guenther kettenis | |||
2018-02-07 | use consistent style for for loop in unmap(), no functional change | Otto Moerbeek | |
2018-01-30 | keep in sync with ld.so malloc.c | Otto Moerbeek | |
2018-01-28 | - An error in the multithreaded case could print the wrong function name | Otto Moerbeek | |
- Start with a full page of struct region_info's - Save an mprotect in the init code: allocate 3 pages with none and make the middle page r/w instead of a r/w allocation and two calls to make the guard pages none | |||
2018-01-26 | - do not junk pages returned by free_bytes(), all freed chunks are already | Otto Moerbeek | |
junked - freezero(): only clear requested size | |||
2018-01-18 | Zap the rotor, it was a wrong idea. Cluebat applied by kshe who | Otto Moerbeek | |
came also up with this diff. Simple, no bias and benchmarks show the extra random calls disappear in te measurement noise. | |||
2018-01-18 | Move to ffs(3) for bitmask scanning. I played with this earlier, | Otto Moerbeek | |
but at that time ffs function calls were generated instead of the compiler inlining the code. Now that ffs is marked protected in libc this is handled better. Thanks to kshe who prompted me to look at this again. | |||
2018-01-08 | optimization and some cleanup; mostly from kshe (except the unmap() part) | Otto Moerbeek | |
2018-01-01 | Only init chunk_info once, plus some moving of code to group related functions. | Otto Moerbeek | |
2017-12-27 | step one in avoiding unneccesary init of chunk_info; | Otto Moerbeek | |
some cleanup; tested by sthen@ on a ports build | |||
2017-11-02 | 's' should include 'f'; from Jacqueline Jolicoeur | Otto Moerbeek | |
2017-10-19 | Restore a return that was inadvertently removed from freezero() in r1.234, | Joel Sing | |
which results in an internal double free when internal functions are not in use. ok otto@ | |||
2017-10-05 | do not return f() where f is a void function; loop var type fix | Otto Moerbeek | |
2017-10-05 | Use dprintf instead of snprintf/write | Otto Moerbeek | |
2017-09-23 | Make delayed free non-optional and make F do an extensive double free check. | Otto Moerbeek | |
ok tb@ tedu@ | |||
2017-09-12 | mapalign returns MAP_FAILED for failuer; from George Koehler | Otto Moerbeek | |
2017-09-11 | check double free before canary for chunks; ok millert@ | Otto Moerbeek | |
2017-08-20 | two MALLOC_STATS only tweaks; one from David CARLIER, the other found by clang | Otto Moerbeek | |
2017-07-10 | one more instance of the previous commit; also initialize ->offset to a | Otto Moerbeek | |
definite value in the size == 0 case | |||
2017-07-07 | Only access offset if canaries are enabled *and* size > 0, otherwise offset | Otto Moerbeek | |
is not initialized. Problem spotted by Carlin Bingham; ok phessler@ tedu@ | |||
2017-06-19 | port the RBT code to userland by making it part of libc. | David Gwynne | |
src/lib/libc/gen/tree.c is a copy of src/sys/kern/subr_tree.c, but with annotations for symbol visibility. changes to one should be reflected in the other. the malloc debug code that uses RB code is ported to RBT. because libc provides the RBT code, procmap doesn't have to reach into the kernel and build subr_tree.c itself now. mild enthusiasm from many ok guenther@ | |||
2017-05-13 | - fix bug wrt posix_memalign(3) of blocks between half a page and a page | Otto Moerbeek | |
- document posix_memalign() does not play nice with reacallocarray(3) and freezero(3) | |||
2017-04-22 | For small allocations (chunk) freezero only validates the given | Otto Moerbeek | |
size if canaries are enabled. In that case we have the exact requested size of the allocation. But we can at least check the given size against the chunk size if C is not enabled. Plus add some braces so my brain doesn't have to scan for dangling else problems when I see this code. | |||
2017-04-18 | don't forget to fill in canary bytes for posix_memalign(3); reported by | Otto Moerbeek | |
and ok jeremy@ | |||
2017-04-17 | whitespace fixes | Otto Moerbeek | |
2017-04-13 | allow clearing less than allocated and document freezero(3) better | Otto Moerbeek | |
2017-04-10 | Introducing freezero(3) a version of free that guarantees the process | Otto Moerbeek | |
no longer has access to the content of a memmory object. It does this by either clearing (if the object memory remains cached) or by calling munmap(2). ok millert@, deraadt@, guenther@ | |||
2017-04-06 | first print size in meta-data then supplied arg size when an inconsistency is | Otto Moerbeek | |
detected wrt recallocarray() | |||
2017-03-28 | small cleanup & optimization; ok deraadt@ millert@ | Otto Moerbeek | |
2017-03-24 | add a helper function to print all pools #ifdef MALLOC_STATS | Otto Moerbeek | |
from David CARLIER | |||
2017-03-24 | move recallocarray to malloc.c and | Otto Moerbeek | |
- use internal meta-data to do more consistency checking (especially with option C) - use cheap free if possible ok deraadt@ | |||
2017-02-15 | Add a NULL test to wrterror() to avoid a NULL deref when called from a | Jonathan Gray | |
free() error path. ok otto@ | |||
2017-02-02 | fix a comment and rm some dead code as a result of the previous diff | Otto Moerbeek | |
2017-02-01 | Let realloc handle and produce moved pointers for allocations between | Otto Moerbeek | |
half a page and a page. ok jmatthew@ tb@ | |||
2017-01-21 | 1. When shrinking a chunk allocation, compare the size of the current | Otto Moerbeek | |
allocation to the size of the new allocation (instead of the requested size). 2. Previously realloc takes the easy way and always reallocates if C is active. This commit fixes by carefully updating the recorded requested size in all cases, and writing the canary bytes in the proper location after reallocating. 3. Introduce defines to test if MALLOC_MOVE should be done and to compute the new value. | |||
2016-11-04 | MALLOC_STATS tweaks, by default not compiled in | Otto Moerbeek | |
2016-11-03 | small tweak to also check canaries if F is in effect | Otto Moerbeek | |
2016-10-31 | remove some old option letters and also make P non-settable. It has | Otto Moerbeek | |
been the default for ages, and I see no valid reason to be able to disable it. ok natano@ | |||
2016-10-28 | Pages in the malloc cache are either reused quickly or unmapped | Otto Moerbeek | |
quickly. In both cases it does not make sense to set hints on them. So remove that option, which is just a remainder of old times when malloc used to hold on to pages. ok stefan@ | |||
2016-10-22 | - fix MALLOC_STATS compile | Otto Moerbeek | |
- redundant cast is redundant | |||
2016-10-21 | fix some void * arithmetic by casting | Otto Moerbeek | |
2016-10-21 | and recommit with fixed GC | Otto Moerbeek | |
2016-10-20 | backout for now; flag combination GC is not ok | Otto Moerbeek | |
2016-10-20 | Also place canaries in > page sized objects (if C is in effect); ok tb@ | Otto Moerbeek | |
2016-10-15 | Wrap _malloc_init() so internal calls go directly | Philip Guenther | |
prodded by otto@ ok kettenis@ otto@ | |||
2016-10-14 | 0xd0 -> 0xdb; ok deraadt@ millert@ tedu@ | Otto Moerbeek | |
2016-10-12 | optimize canary code a bit by storing offset of sizes table instead of | Otto Moerbeek | |
recomputing it all the time | |||
2016-10-07 | stray tab | Otto Moerbeek | |
2016-10-07 | Beter implementation of chunk canaries: store size in chunk meta data | Otto Moerbeek | |
instead of chunk itself; does not change actual allocated size; ok tedu@ | |||
2016-09-21 | Delete casts to off_t and size_t that are implied by assignments | Philip Guenther | |
or prototypes. Ditto for some of the char* and void* casts too. verified no change to instructions on ILP32 (i386) and LP64 (amd64) ok natano@ abluhm@ deraadt@ millert@ |