diff options
| author | kamil <kamil@NetBSD.org> | 2015-07-26 17:09:29 +0000 |
|---|---|---|
| committer | kamil <kamil@NetBSD.org> | 2015-07-26 17:09:29 +0000 |
| commit | 4430bd7ee83e5398e42ec7fb80b71aa3b8257bb8 (patch) | |
| tree | 39abd0ae6d39215ff586d06c8ff7c385545df2ad /lib/libc/stdlib | |
| parent | a2215c00ce76b02eac77f17c91b1922826691290 (diff) | |
Add history of allocators
Idea accepted by <christos>
No objctions from <riastradh>
Diffstat (limited to 'lib/libc/stdlib')
| -rw-r--r-- | lib/libc/stdlib/malloc.3 | 48 |
1 files changed, 46 insertions, 2 deletions
diff --git a/lib/libc/stdlib/malloc.3 b/lib/libc/stdlib/malloc.3 index 2a05f0f9993..b83cb701232 100644 --- a/lib/libc/stdlib/malloc.3 +++ b/lib/libc/stdlib/malloc.3 @@ -1,4 +1,4 @@ -.\" $NetBSD: malloc.3,v 1.42 2015/07/26 17:00:37 kamil Exp $ +.\" $NetBSD: malloc.3,v 1.43 2015/07/26 17:09:29 kamil Exp $ .\" .\" Copyright (c) 1980, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -34,7 +34,7 @@ .\" @(#)malloc.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD: src/lib/libc/stdlib/malloc.3,v 1.73 2007/06/15 22:32:33 jasone Exp $ .\" -.Dd February 5, 2015 +.Dd July 26, 2015 .Dt MALLOC 3 .Os .Sh NAME @@ -265,3 +265,47 @@ and .Fn free functions conform to .St -isoC . +.Sh HISTORY +A +.Fn free +internal kernel function and a predecessor to +.Fn malloc , +.Fn alloc , +first appeared in +.At v1 . +The C Library functions +.Fn alloc +and +.Fn free +appeared in +.At v6 . +The functions +.Fn malloc , +.Fn calloc , +and +.Fn realloc +first appeared in +.At v7 . +.Pp +A new implementation by Chris Kingsley was introduced in +.Bx 4.2 , +followed by a complete rewrite by Poul-Henning Kamp ( +.Dq phk's malloc +or +.Dq new malloc ) +which appeared in +.Fx 2.2 +and was included in +.Nx 1.5 +and +.Ox 2.0 . +These implementations were all +.Xr sbrk 2 +based. +.Pp +The +.Fn jemalloc 3 +allocator became the default system allocator first in +.Fx 7.0 +and then in +.Nx 5.0 . |
