summaryrefslogtreecommitdiff
path: root/src/lib/libc/stdlib (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* Stop enumeration all allocation functions, just say "allocation functions"libressl-v2.5.2otto2017-03-261-32/+13
| | | | ok jmc@ deraadt@
* add a helper function to print all pools #ifdef MALLOC_STATSotto2017-03-241-1/+16
| | | | from David CARLIER
* document new recallocarray diagnostic; zap a few diagnostics that shouldotto2017-03-241-8/+9
| | | | never occur
* move recallocarray to malloc.c andotto2017-03-242-19/+207
| | | | | | | - use internal meta-data to do more consistency checking (especially with option C) - use cheap free if possible ok deraadt@
* remove unneccessary macro;jmc2017-03-171-2/+2
|
* Strengthen description of recallocarray(3) behaviour, hoping that readersderaadt2017-03-171-5/+10
| | | | | make the behaviour -> use case connection. help from jmc and jsing
* Some tweaks from jmc@ and describe better what recallocarray does;otto2017-03-071-7/+16
| | | | help and ok from tom@ and deraadt@
* Introducing recallocarray(3), a blend of calloc(3) and reallocarray(3)otto2017-03-063-7/+147
| | | | | with the added feature that released memory is cleared. Much input from various developers. ok deraadt@ tom@
* Add a NULL test to wrterror() to avoid a NULL deref when called from ajsg2017-02-151-2/+2
| | | | | | free() error path. ok otto@
* malloc does not *need* to return page-aligned objects for size >=otto2017-02-121-5/+2
| | | | | a page. This is not required by any standard and other malloc implementation do not document (or implement) this. ok deraadt@
* fix a comment and rm some dead code as a result of the previous diffotto2017-02-021-8/+5
|
* Let realloc handle and produce moved pointers for allocations betweenlibressl-v2.5.1otto2017-02-011-20/+37
| | | | half a page and a page. ok jmatthew@ tb@
* 1. When shrinking a chunk allocation, compare the size of the currentotto2017-01-211-46/+87
| | | | | | | | | | 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.
* Remove unnecessary casts of 'a' to char * since 'a' is already char *.millert2017-01-041-10/+10
| | | | | This is a remnant from the original 4.4BSD code that had 'a' as void * in the function args. No binary change. OK bluhm@
* MALLOC_STATS tweaks, by default not compiled inotto2016-11-041-13/+29
|
* small tweak to also check canaries if F is in effectotto2016-11-031-3/+5
|
* remove some old option letters and also make P non-settable. It hasotto2016-10-311-24/+6
| | | | | been the default for ages, and I see no valid reason to be able to disable it. ok natano@
* Pages in the malloc cache are either reused quickly or unmappedotto2016-10-281-14/+1
| | | | | | 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@
* $OpenBSD$tb2016-10-223-0/+3
|
* - fix MALLOC_STATS compileotto2016-10-221-3/+6
| | | | - redundant cast is redundant
* fix some void * arithmetic by castingotto2016-10-211-4/+4
|
* and recommit with fixed GCotto2016-10-211-103/+112
|
* backout for now; flag combination GC is not okotto2016-10-201-110/+103
|
* avoid sentence splicing;jmc2016-10-201-2/+2
|
* canary corruption message changed a bitotto2016-10-201-5/+5
|
* Also place canaries in > page sized objects (if C is in effect); ok tb@otto2016-10-201-103/+110
|
* Wrap _malloc_init() so internal calls go directlyguenther2016-10-151-1/+2
| | | | | prodded by otto@ ok kettenis@ otto@
* 0xd0 -> 0xdb; ok deraadt@ millert@ tedu@otto2016-10-141-3/+3
|
* optimize canary code a bit by storing offset of sizes table instead ofotto2016-10-121-5/+7
| | | | recomputing it all the time
* make clear the length printed is the requested lengthotto2016-10-081-3/+3
|
* grammar fix previous;jmc2016-10-071-2/+2
|
* document "chunk canary corrupted" errorotto2016-10-071-2/+7
|
* stray tabotto2016-10-071-2/+2
|
* Beter implementation of chunk canaries: store size in chunk meta dataotto2016-10-071-61/+63
| | | | instead of chunk itself; does not change actual allocated size; ok tedu@
* Delete casts to off_t and size_t that are implied by assignmentsguenther2016-09-212-9/+9
| | | | | | | 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@
* move page junking tp unmap(), right before we stick the region in the cache;otto2016-09-181-6/+6
| | | | ok tedu@
* fix Dt;jmc2016-09-041-2/+2
|
* Set errno more consistently, and fix a warning, ok tedunicm2016-09-041-21/+29
|
* rmtedu2016-09-041-68/+0
|
* oops, name file after main functiontedu2016-09-041-0/+68
|
* it doesn't say anything yet, but start adding a man pagetedu2016-09-041-0/+68
|
* Make the key sizes and offsets arrays const, ok tedunicm2016-09-041-2/+2
|
* Less lock contention by using more pools for mult-threaded programs.otto2016-09-011-85/+178
| | | | tested by many (thanks!) ok tedu, guenther@
* black magic for sparc page size can gotedu2016-09-011-4/+2
|
* Don't call lstat() before readlink() just to see if it's a symlink,guenther2016-08-281-14/+17
| | | | | | as readlink() will tell you that more cheaply. ok millert@
* wrterror() is fatal, delete dead code; ok tom@ natano@ tedu@otto2016-08-171-61/+22
|
* add a bit of spacing to previous, to keep the notes about deprecatedjmc2016-08-152-4/+6
| | | | | | functions out the way of the main body; ok guenther
* Reduce qabs() and qdiv() to aliases of llabs() and lldiv().guenther2016-08-1412-228/+36
| | | | | | Merge the manual pages and call them deprecated there. ok and manpage tweak jmc@, ok natano@
* J/j is a three valued option, document and fix code to actuall support thatotto2016-07-061-3/+5
| | | | | with a little help from jmc@ for the man page bits ok jca@ and a reluctant tedu@
* adapt S option: add C, rm F (not relevant with 0 cache and disablesotto2016-06-301-3/+3
| | | | chunk rnd), rm P: is default