Subject: Re: Machine-independent bus DMA interface proposal
To: None <firstname.lastname@example.org, tech-kern@NetBSD.ORG>
From: John Kohl <email@example.com>
Date: 09/24/1996 19:32:55
>>>>> "DF" == Dennis Ferguson <firstname.lastname@example.org> writes:
DF> What I am suggesting is that the cost of doing
DF> this with your current proposal is going to be largely dominated by the need
DF> to malloc() a buffer for nothing other than parameter passing, and to
DF> free() it afterwards.
This cost can be greatly amortized with certain allocation strategies,
such as the slab allocator described by someone from Sun at the Winter
1995 USENIX. Basically, you take a chunk/page/whatever of memory from
the normal kernel allocator and pre-initialize it for fixed-size
allocations specific to a memory type, using simple free list management
within this slab. In the case at hand, you may need more than one size
to allocate from a fixed pool, but you get the idea.