summaryrefslogtreecommitdiff
path: root/src/lib/libc/stdlib/malloc.3 (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* 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.
* stucture -> structure;jmc2010-01-251-3/+3
|
* New options 'S', as a shorthand for the options most suitable as anotto2010-01-131-2/+4
| | | | extra safeguard (FGJ). Idea from deraadt@; ok deraadt@ dlg@
* rewrite the history section, prompted by Paul Stoeber; ok deraadt@ jmc@otto2009-10-101-25/+28
|
* kill whitespace at eol;jmc2009-02-131-2/+2
|
* decribe 'F' better and mention flags are debugging aids; ok tedu@ jmc@otto2009-02-131-8/+10
|
* Remove mprotecting of struct dir_info introduced in previous commitdjm2008-12-301-9/+2
| | | | | | | (MALLOC_OPTIONS=L). It was too slow to turn on by default, and we don't do optional security. requested by deraadt@ grumbling ok otto@
* extra paranoia for malloc(3):djm2008-12-291-2/+9
| | | | | | | | | | | | | | | | Move all runtime options into a structure that is made read-only (via mprotect) after initialisation to protect against attacks that overwrite options to turn off malloc protections (e.g. use-after-free) Allocate the main bookkeeping data (struct dir_info) using mmap(), thereby giving it an unpredictable address. Place a PROT_NONE guard page on either side to further frustrate attacks on it. Add a new 'L' option that maps struct dir_info PROT_NONE except when in the allocator code itself. Makes attacks on it basically impossible. feedback tedu deraadt otto canacar ok otto
* Fix typo, okay jmc@.pedro2008-11-261-3/+3
|
* move allocations between half a page and a page as close to the end ofotto2008-11-201-2/+3
| | | | | the page as possible (i.e. make malloc option P a default). ok art@ millert@ krw@
* fix markup of example line and description of G flag; partly from andotto2008-11-021-5/+4
| | | | ok jmc@
* remove distinction between warnings and errors, ok deraadt@ djm@otto2008-11-021-26/+18
|
* small cleanup of error/warning stringsotto2008-08-071-3/+3
|
* man page bits for new malloc; ok jmc@otto2008-07-281-43/+33
|
* kill an Xr to a non-existent man page, ulimit(1);jmc2008-05-201-5/+3
|
* remove recalloc(3); it is buggy and impossible to repair without bigotto2008-05-191-25/+3
| | | | costs; ok jmc@ for the man page bits; ok millert@ deraadt@
* no need to talk about bits; ok millert jmcderaadt2007-09-051-3/+3
|
* Update free(3) section--we use mmap()/munmap(), not brk().millert2007-09-031-4/+6
| | | | Based on a diff from Mike Belopuhov. OK jmc@
* add recaloc(3)millert2007-09-031-3/+25
|
* Clarify the example about avoiding overflow. OK ray@ deraadt@millert2007-08-081-3/+3
|
* convert to new .Dd format;jmc2007-05-311-2/+2
|
* Fix 'double by a factor of two' and make cache options a bit morepedro2006-06-061-4/+4
| | | | descriptive while at it, input and okay jmc@
* Use SIZE_MAX instead of SIZE_T_MAX, the latter is not POSIX andotto2006-04-021-2/+2
| | | | remove redundant check on size. ok millert@ deraadt@
* Add warning about malloc(num * size) and recommend calloc() instead,ray2006-03-261-5/+40
| | | | | | | | or if malloc must be used suggest check. Get rid of "one". OK deraadt@ and jmc@, OK kjell@ to earlier version with "one"s.
* missing auxillary verbjakemsr2006-01-181-2/+2
| | | | "yes, that is correct." jmc@ (a while back)
* - typos, punctuation, layout, macro tweaksjaredy2005-07-261-4/+11
| | | | | | - break long lines ok jmc
* no need to insert spacing between list members;jmc2005-06-071-13/+1
|
* adding pointer protection to 'G' was too heavyweight. Since malloc guardtedu2005-06-071-3/+6
| | | | should be generally usable, split this out into option 'P'. ok deraadt
* add a note describing latest guard featuretedu2005-05-241-1/+3
|