summaryrefslogtreecommitdiff
path: root/src/lib/libc/stdlib/malloc.3 (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Typo: freezeo -> freezerotb2017-05-151-3/+3
| | | | From "fenderq" on freenode via tj@
* Rearrange text a bit to make it clear what "discarded" means; ok jmc@ deraadt@otto2017-04-231-8/+13
|
* consictently use .Dv NULL and a few other tweaks; ok schwarze@otto2017-04-171-20/+17
|
* allow clearing less than allocated and document freezero(3) betterotto2017-04-131-8/+21
|
* tweak previous;jmc2017-04-101-4/+4
|
* Introducing freezero(3) a version of free that guarantees the processotto2017-04-101-24/+58
| | | | | | 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@
* Consistentcy between nmembers and size order. From Christopher Hettrick;otto2017-04-061-8/+8
| | | | ok deraadt@
* rephrase more enumerations of functionsotto2017-03-291-13/+10
|
* Stop enumeration all allocation functions, just say "allocation functions"libressl-v2.5.2otto2017-03-261-32/+13
| | | | ok jmc@ deraadt@
* document new recallocarray diagnostic; zap a few diagnostics that shouldotto2017-03-241-8/+9
| | | | never occur
* 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-061-6/+64
| | | | | with the added feature that released memory is cleared. Much input from various developers. ok deraadt@ tom@
* 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@
* avoid sentence splicing;jmc2016-10-201-2/+2
|
* canary corruption message changed a bitotto2016-10-201-5/+5
|
* 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
|
* Document ``use after free'' error messageotto2016-04-031-2/+4
|
* Remove sentences in RETURN VALUES sections saying that functions withmmcc2016-03-121-6/+2
| | | | | | | | | | | | | void return types 'return no value'. This is obvious and therefore unneccessary to mention. We spare rewind(3)'s sentence because espie@ pointed out that it's a warning - the function masks a potential error. This commit also adds a sentence to X509_free clarifying that it's NULL-safe. This bit was discussed with doug@. ok martijn@, sentiment supported by schwarze@
* Fix err(3) calls after allocation failures in examples.schwarze2016-02-051-8/+8
| | | | | | There is long-standing consensus that err(1, NULL) is the best idiom after failure of malloc(3) and friends. Quirk in the manual noticed by tb@.
* Long ago, malloc internally had two kinds of failures, warnings and errors.tedu2016-01-061-6/+3
| | | | | | | | The 'A' option elevated warnings to errors, and has been the default for some time. Then warnings were effectively eliminated in favor of everything being an error, but then the 'a' flag turned real errors into warnings! Remove the 'a' option entirely. You shouldn't have used it anyway. ok tb tdeval
* use .Va for global variables, and .Vt where the type is includedschwarze2015-09-141-4/+3
|
* remove incorrect statement. the standard *does* require calloc to checktedu2015-03-141-7/+2
| | | | | for overflow. stop talking about old broken systems, there's little use for such info.
* missing , found by Dongsheng Songderaadt2015-01-081-3/+3
|
* fix NAME;jmc2014-12-091-3/+3
|
* remove cfree from documentationtedu2014-12-081-19/+3
|
* malloc(3) is in the "comp" install set, malloc.conf(5) in "man",schwarze2014-12-061-126/+8
| | | | | | breaking the hardlink between file system entries, confusing apropos(1). Split malloc.conf(5) out of malloc(3) as suggested by deraadt@. Feedback and OK jmc@, OK deraadt@ tedu@ jasper@.
* clean up verbiage around the calculations; ok ingo jmc ottoderaadt2014-10-301-5/+5
|
* Don't mention old systems where realloc(NULL, n) didn't work as wemillert2014-10-301-11/+7
| | | | | don't want to give people the idea that this is non-portable (it has been present since C89). OK deraadt@ schwarze@
* Save space in man page: err() -> errc() and combine vars.doug2014-10-231-18/+11
| | | | | | Suggested by millert@ and schwarze@. OK schwarze@, millert@
* Avoid writing in second person in malloc.3doug2014-10-221-13/+12
| | | | ok deraadt@
* List extensions in the STANDARDS section, replacing some text below CAVEATS.schwarze2014-10-201-33/+30
| | | | | Remove excessive technicalities on zero-sized objects as suggested by deraadt@. contributions and ok deraadt@, ok jmc@ on an earlier version
* make RETURN VALUES more conciseschwarze2014-10-191-77/+28
| | | | | and fix two instances of "new sentence, new line" while here feedback and ok jmc@, ok doug@
* Revamp malloc.3 by reordering the sections and rewriting parts.doug2014-10-191-185/+417
| | | | | | | | | | | | | | | | | | | | | | | | | | | The old man page had a lot of useful information, but it was all mixed together which made it difficult to reference. The main theme in this commit is that the sections are more focused: * DESCRIPTION describes the overall behavior * RETURN VALUES describes what it may return (including implementation defined values) * EXAMPLES shows why we recently started an audit on malloc and realloc usage in the tree. * Added CAVEATS which describes what is implementation defined, gotchas and security implications of misusing these functions * Added IDIOMS which describes how these functions should or should not be used The MALLOC_OPTIONS section was left unchanged. Function names were added to DIAGNOSTICS and STANDARDS. The MALLOC_OPTIONS and DIAGNOSTICS sections were pushed down in the page so more pertinent information is higher up. This has gone through several revisions thanks to input from deraadt@ and schwarze@. Ingo also helped with some of the mandoc formatting. OK schwarze@ (as far as it is a good starting point and the code snippets look ok)
* tweak previous; ok sthenjmc2014-05-011-3/+3
|
* first cut at documenting the change to malloc doing a partial 'junk' bysthen2014-04-301-2/+7
| | | | default and the new 'j' option to disable this; ok jmc@
* - one more mallocarray -> reallocarrayjmc2014-04-221-3/+3
| | | | - use <>
* change mallocarray to reallocarray. useful in a few more situations.tedu2014-04-221-12/+9
| | | | | malloc can, as always, be emulated via realloc(NULL). ok deraadt
* Introducing: void *mallocarray(size_t nmemb, size_t size);deraadt2014-04-211-7/+22
| | | | | Like calloc(), except without the cleared-memory gaurantee ok beck guenther, discussed for more than a year...
* HISTORY; tweaks and ok sobrado@ jmc@schwarze2013-07-181-5/+22
|
* Use the fancy .In macro for includes. From Jan Klemkow. ok jmc schwarzetedu2013-06-051-3/+3
|
* Add a new malloc option 'U' => "Free unmap" that does the guarding/djm2012-11-021-3/+12
| | | | | | | | | | | | unmapping of freed allocations without disabling chunk randomisation like the "Freeguard" ('F') option does. Make security 'S' option use 'U' and not 'F'. Rationale: guarding with no chunk randomisation is great for debugging use-after-free, but chunk randomisation offers better defence against "heap feng shui" style attacks that depend on carefully constructing a particular heap layout so we should leave this enabled when requesting security options.
* Show (in the example) that < and > can be used multiple times; ok jmc@otto2011-07-221-4/+5
| | | | jasper@
* - add a MALLOC_OPTIONS section header. the content is already there, but havingjasper2011-07-211-3/+3
| | | | | | a section will help people looking for just the MALLOC_OPTIONS. ok otto@ jmc@
* oops - forgot to check for trailing whitespace;jmc2010-05-261-2/+2
|
* reword the 'D' dump bit to make it clear that the malloc.out file needsthib2010-05-261-4/+5
| | | | | | | to exist before exit for malloc to dump stats in it. tweaks from jmc@ ok otto@,jmc@
* add posix_madvise, posix_memalign, strndup, and strnlen. mostly fromtedu2010-05-181-3/+4
| | | | | brad and millert, with hints from guenther, jmc, and otto I think. ok previous.