Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libc/stdlib Add history of allocators
details: https://anonhg.NetBSD.org/src/rev/60fd9e23ae45
branches: trunk
changeset: 809664:60fd9e23ae45
user: kamil <kamil%NetBSD.org@localhost>
date: Sun Jul 26 17:09:29 2015 +0000
description:
Add history of allocators
Idea accepted by <christos>
No objctions from <riastradh>
diffstat:
lib/libc/stdlib/malloc.3 | 48 ++++++++++++++++++++++++++++++++++++++++++++++--
1 files changed, 46 insertions(+), 2 deletions(-)
diffs (66 lines):
diff -r 380c37824567 -r 60fd9e23ae45 lib/libc/stdlib/malloc.3
--- a/lib/libc/stdlib/malloc.3 Sun Jul 26 17:03:06 2015 +0000
+++ b/lib/libc/stdlib/malloc.3 Sun Jul 26 17:09:29 2015 +0000
@@ -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 @@
.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 .
Home |
Main Index |
Thread Index |
Old Index