Subject: Re: pool_get()/pool_put() or malloc()/free()
To: None <>
From: Izumi Tsutsui <>
List: tech-kern
Date: 10/26/2000 23:13:11
I asked:

> > After sun3x pmap fix, I notice hp300 pmap have switched
> > to use a memory pool to allocate pmap structures.
> > Is there any advantage to use pool_get()/pool_put() pair
> > than malloc()/free() ? wrote:

> 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. wrote:

> Yes -- doesn't use kmem_map (saves that precious range of KVA
> space), and is more efficient, since it can compact the structures,
> rather than doing power-of-two allocation.

Thank you for your descriptions. I will check the difference
on my sun3x.

BTW, some other ports (arm32, mips, powerpc and some of m68k)
still use malloc/free for pmap structures. (vax uses MALLOC/FREE)
Should they also be changed to use pool_get/pool_put ?
Izumi Tsutsui