Subject: Re: Memory pools
To: =?iso-8859-1?Q?P=E5l_Halvorsen?= <paalh@unik.no>
From: Allen Briggs <briggs@ninthwonder.com>
List: port-i386
Date: 05/18/2000 10:09:19
> Hi!
Hi!
> Does anyone have some documentation on the memory pools?
Section 9 of the man pages has "pool", with information on
pool_create, pool_get, pool_put, etc... Pool_init is not
in there, which is probably a doc-bug.
> I have made a "mmclpool" a la the mbuf mclpool:
>
> pool_init(&mmclpool, MMCLBYTES, 0, 0, 0, "mmclpl", 0, mmclpool_alloc,
> mmclpool_release, 0);
>
> Does
> p = pool_get(&mmclpool, PR_WAITOK);
> return a pointer to a memory cluster to be used as the extended memory
> segment in an mbuf of MMCLBYTES size or do I have to allocate this memory
> by using malloc?
pool_get() allocates MMCLBYTES from the pool.
-allen