httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jean-frederic clere <jfcl...@gmail.com>
Subject Re: ap_slotmem
Date Wed, 13 May 2009 16:01:27 GMT
Jim Jagielski wrote:
> 
> 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,

With a int * instead a char * we could have a kind of next free to have 
a fast grab(alloc).

Cheers

Jean-Frederic

Mime
View raw message