summaryrefslogtreecommitdiffstats
path: root/lib/libc/stdlib/malloc.3
Commit message (Collapse)AuthorAgeFilesLines
* Remove support for lazy deallocation. Benchmarks across a wide range ofjasone2008-02-171-12/+1
| | | | | | | | allocation patterns, number of CPUs, and MALLOC_OPTIONS settings indicate that lazy deallocation has the potential to worsen throughput dramatically. Performance degradation occurs when multiple threads try to clear the lazy free cache simultaneously. Various experiments to avoid this bottleneck failed to completely solve this problem, while adding yet more complexity.
* Track dirty unused pages so that they can be purged if they exceed ajasone2008-02-061-15/+17
| | | | | | | | | | | | | | | | | | | | | | | | | threshold, according to the 'F' MALLOC_OPTIONS flag. This obsoletes the 'H' flag. Try to realloc() large objects in place. This substantially speeds up incremental large reallocations in the common case. Fix a bug in arena_ralloc() that caused relocation of sub-page objects even if the old and new sizes were in the same size class. Maintain trees of runs and simplify the per-chunk page map. This allows logarithmic-time searching for sufficiently large runs in arena_run_alloc(), whereas the previous algorithm required linear time in the worst case. Break various large functions into smaller sub-functions, and inline only the functions that are in the fast path for small object allocation/deallocation. Remove an unnecessary check in base_pages_alloc_mmap(). Avoid integer division in choose_arena() for the NO_TLS case on single-CPU systems.
* Enable both sbrk(2)- and mmap(2)-based memory acquisition methods byjasone2008-01-031-12/+12
| | | | | | | | | default. This has the disadvantage of rendering the datasize resource limit irrelevant, but without this change, legitimate uses of more memory than will fit in the data segment are thwarted by default. Fix chunk_alloc_mmap() to work correctly if initial mapping is not chunk-aligned and mapping extension fails.
* Add the 'D' and 'M' run time options, and use them to control whetherjasone2007-12-271-24/+57
| | | | | | | | | | | | | | | | | | memory is acquired from the system via sbrk(2) and/or mmap(2). By default, use sbrk(2) only, in order to support traditional use of resource limits. Additionally, when both options are enabled, prefer the data segment to anonymous mappings, in order to coexist better with large file mappings in applications on 32-bit platforms. This change has the potential to increase memory fragmentation due to the linear nature of the data segment, but from a performance perspective this is mitigated by the use of madvise(2). [1] Add the ability to interpret integer prefixes in MALLOC_OPTIONS processing. For example, MALLOC_OPTIONS=lllllllll can now be specified as MALLOC_OPTIONS=9l. Reported by: [1] rwatson Design review: [1] alc, peter, rwatson
* Document the B and L MALLOC_OPTIONS.jasone2007-11-271-1/+26
|
* Add information about the implications of using mmap(2) instead of sbrk(2).jasone2007-06-151-1/+19
| | | | Submitted by: bmah, jhb
* Update the IMPLEMENTATION NOTES section to reflect recent mallocjasone2007-03-281-13/+30
| | | | enhancements.
* Markup fixes.ru2006-09-171-51/+51
|
* s/soley/solelyschweikh2006-04-131-1/+1
|
* Add malloc_usable_size() to the RETURN VALUES section.jasone2006-04-041-1/+6
|
* Add malloc_usable_size(3).jasone2006-03-281-2/+25
| | | | Discussed with: arch@
* Modify allocation policy, in order to avoid excessive fragmentation forjasone2006-03-171-50/+52
| | | | | | | | | | | | | | | allocation patterns that involve a relatively even mixture of many different size classes. Reduce the chunk size from 16 MB to 2 MB. Since chunks are now carved up using an address-ordered first best fit policy, VM map fragmentation is much less likely, which makes smaller chunks not as much of a risk. This reduces the virtual memory size of most applications. Remove redzones, since program buffer overruns are no longer as likely to corrupt malloc data structures. Remove the C MALLOC_OPTIONS flag, and add H and S.
* Expand contractions.joel2006-02-011-1/+1
|
* Replace malloc(), calloc(), posix_memalign(), realloc(), and free() withjasone2006-01-131-180/+116
| | | | | | | a scalable concurrent allocator implementation. Reviewed by: current@ Approved by: phk, markm (mentor)
* Fix prototype.ru2005-11-231-1/+3
|
* Sort sections.ru2005-01-201-23/+23
|
* Reword recent addition about memory moving.alfred2004-08-191-5/+4
| | | | | | | | Requested by: keramida Bump .Dd Requested by: ru
* Clarify that realloc and reallocf may move the memory allocation.alfred2004-08-181-3/+7
|
* mdoc(7) police: Deal with self-xrefs.ru2002-12-241-1/+1
|
* Document what really occurs when we obtain an error.trhodes2002-12-201-6/+9
| | | | | PR: 43357 Submitted by: David Schultz <dschultz@uclink.Berkeley.EDU>
* mdoc(7) police: Fixed abuses of the .Ar and .Em macros.ru2002-12-181-1/+1
|
* mdoc(7) police: "The .Fn function".ru2002-12-181-1/+3
|
* Uniformly refer to a file system as "file system".ru2002-12-121-1/+1
| | | | Approved by: re
* Consistently mark std(in|out|err) with .Dv, because that's how theyru2002-12-041-2/+6
| | | | | | | are marked up in stdio(3), and because they are defined expressions of type "FILE *". Approved by: re
* Clarify the bit about realloc() and its `ptr' argument a bit.keramida2002-06-061-2/+3
| | | | | | | | Hopefully, now it is more clear that the memory referenced by the ptr argument of realloc(ptr,size) is freed and only the return value of realloc() points to a valid memory area upon successful completion. Submitted by: Martin Faxer <gmh003532@brfmasthugget.se>
* mdoc(7) police: nit.ru2002-05-291-1/+1
|
* Constify _malloc_options.phk2002-04-241-2/+2
|
* mdoc(7) police: kill HSBs, add missing comma.ru2001-12-121-8/+13
|
* Be more explicit about the fact that realloc() might return akeramida2001-11-241-0/+4
| | | | | | | different pointer than the one passed to it. PR: docs/31925 Submitted by: Andrew <andrew@ugh.net.au>
* malloc and calloc do not free memory.dd2001-11-051-2/+3
| | | | | PR: 31365 Submitted by: SUZUKI Koichi <koich@cac.co.jp>
* Move to using .In instead of .Fd #include <> for include mark-up.asmodai2001-09-071-1/+1
| | | | Inspired by comment from: dd
* Markup nits: use diagnostic type lists for error and warning messages.ru2001-08-101-21/+17
| | | | | | | | Backout previous revision. We should not expand plain text xrefs if they appear in the literal text, e.g. in the error or warning message of the library function. (Submitted by: bde) Moved "out of memory" from warning to errors section.
* mdoc(7) police: expand plain text xrefs.ru2001-08-081-1/+4
|
* Remove whitespace at EOL.dd2001-07-151-8/+8
|
* mdoc(7) police: removed HISTORY info from the .Os call.ru2001-07-101-1/+1
|
* mdoc(7) police: remove extraneous .Pp before and/or after .Sh.dd2001-07-091-1/+0
|
* mdoc(7) police: mark NULL with .Dv.ru2001-07-041-8/+24
|
* mdoc(7) police: the BUGS section should go after HISTORY and AUTHORS.dd2001-06-241-6/+6
|
* The fact that phk wrote this is not a bug!dd2001-06-241-5/+2
|
* Reword a sentence to make it proper English.dd2001-06-241-1/+1
|
* .St -ansiC -> .St -isoCru2001-02-261-1/+1
|
* mmap(3) -> mmap(2).ru2001-02-121-2/+2
|
* .Xr to mmap.nik2001-02-111-1/+2
|
* mdoc(7) police: Change -filled displays (which just happenru2001-02-071-1/+1
| | | | | | to be the same as -ragged in the current implementation) to -ragged. With mdocNG, -filled displays produce the correct output, formatted and justified to both margins.
* mdoc(7) police: split punctuation characters + misc fixes.ru2001-02-011-2/+2
|
* Prepare for mdoc(7)NG.ru2001-01-161-2/+2
|
* Prepare for mdoc(7)NG.ru2000-12-291-0/+2
|
* mdoc(7) police: removed history info from the .Os FreeBSD call.ru2000-12-141-1/+1
|
* Make it possible to override the function which writes messages tophk2000-11-261-6/+14
| | | | | | | stderr in case of warnings and errors. Rename malloc_options to have a leading underscore, I belive I have been told that is more correct namespace wise.
* Use Fx macro wherever possible.ru2000-11-141-1/+2
|
OpenPOWER on IntegriCloud