On May 13, 2009, at 10:17 AM, jean-frederic clere wrote:

Jim Jagielski wrote:
OK, I think having 2 more API functions rounds out the impl;
Consider: the current assumption is that the user manages the
indexes into the slotmem. But what if the user doesn't?

Then he can't use the stuff :-(

Certainly
it would make sense for the slotmem to know what slots are now
currently available and return a "free" slot to the caller.
So I think a "grab" and a "return" function are required as well.

I have malloc() / free() / getused() / getfree() switchable logic that I can add quickly. Basically it create a table of used and free slotmem additionally to data it.


*grin*

Yesterday I added in a 'inuse' table, basically to optimize the ap_slotmem_do()
function, and already have a 'grab'/'return' impl here ready to svn ci.
(I'm guessing my grab == malloc and return == free)... I like the
idea of a knowing the amount free and used as well...

Reply via email to