Module Name:    src
Committed By:   kamil
Date:           Sun Jul 26 17:09:29 UTC 2015

Modified Files:
        src/lib/libc/stdlib: malloc.3

Log Message:
Add history of allocators

Idea accepted by <christos>
No objctions from <riastradh>


To generate a diff of this commit:
cvs rdiff -u -r1.42 -r1.43 src/lib/libc/stdlib/malloc.3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libc/stdlib/malloc.3
diff -u src/lib/libc/stdlib/malloc.3:1.42 src/lib/libc/stdlib/malloc.3:1.43
--- src/lib/libc/stdlib/malloc.3:1.42	Sun Jul 26 17:00:37 2015
+++ src/lib/libc/stdlib/malloc.3	Sun Jul 26 17:09:29 2015
@@ -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 .

Reply via email to