Subject: Re: pool_get()/pool_put() or malloc()/free()
To: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
From: Michael Graff <explorer@flame.org>
List: tech-kern
Date: 10/25/2000 14:27:25
Speed.
Pools are fixed-size structures with built-in free lists. To get a
page from a pool, unless it has to dig into system memory to add more
basic blocks, you're only competing with other uses of that specific
pool rather than anything that uses malloc/free.
--Michael
Izumi Tsutsui <tsutsui@ceres.dti.ne.jp> writes:
> After sun3x pmap fix, I notice hp300 pmap have switched
> to use a memory pool to allocate pmap structures.
>
> http://cvsweb.netbsd.org/bsdweb.cgi/syssrc/sys/arch/hp300/hp300/pmap.c.diff?r1=1.58&r2=1.59
>
> Is there any advantage to use pool_get()/pool_put() pair
> than malloc()/free() ?
> ---
> Izumi Tsutsui
> tsutsui@ceres.dti.ne.jp