Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 29 Mar 2006 10:48:46 +0200
From:      Gunther Nikl <gni@gecko.de>
To:        Peter Jeremy <peterjeremy@optushome.com.au>
Cc:        Jason Evans <jasone@freebsd.org>, freebsd-arch@freebsd.org
Subject:   Re: Proposed addition of malloc_size_np()
Message-ID:  <20060329084846.GA65703@lorien.int.gecko.de>
In-Reply-To: <20060328091153.GC961@turion.vk2pj.dyndns.org>
References:  <44247DF1.8000002@FreeBSD.org> <20060326110929.V35431@fledge.watson.org> <4426D7A0.4040007@FreeBSD.org> <200603271110.02917.jhb@freebsd.org> <44281421.3060401@FreeBSD.org> <20060327185017.GF7001@funkthat.com> <352D1430-CC72-47EE-9E50-B1C4404ACA95@FreeBSD.org> <20060328091153.GC961@turion.vk2pj.dyndns.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Mar 28, 2006 at 08:11:53PM +1100, Peter Jeremy wrote:
> On Mon, 2006-Mar-27 12:52:17 -0800, Jason Evans wrote:
> >void *
> >malloc(size_t size);
> >
> >void *
> >calloc(size_t size);
> >
> >void *
> >realloc(void *ptr, size_t size, size_t old_size);
> >
> >void
> >free(void *ptr, size_t size);
> 
> ISTR AmigaDOS did something like this (my autodocs are packed away
> somewhere so I can't quickly check).

FYI, its AllocMem (which also has a flags argument) and FreeMem. Later
AllocVec (caching the size) and FreeVec were added to the system. Since
using these system functins will lead to fragmented memory new functions
were added using pools. An anpplication allocated a pool and then allocated
from that pool. Then it could free individual allocations or deallocate the
pool which would release all memory from the pool at once.

Gunther



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060329084846.GA65703>