C (256/304)

From:Jack York
Date:30 Aug 2000 at 14:13:50
Subject:Re: Freeing list with Classact

Hello Allan

On 29-Aug-00, Allan Odgaard wrote:
> On 29-Aug-00, Jack York wrote:
>
>> This is basically what I do when I generate the two lists:
>> [...] And when I free these two lists, the first takes
>> about 20 seconds while the second takes about 3. [...]
>> the AddToList function. Just allocate a node, [...]
>
> Does the AddToList function use pools?

I don't know, there's nothing in the docs that explains it. Although
I would guess that to be the case since there is a function to free the
individual nodes and one to free the whole list at once (like
FreePooled and DeletePool).

> It sounds very much like you're suffering from the bad implementation of
> FreePooled().

> A quick fix is to hand over a pool to the AddToList()-function, so that
> each list has its own pool. But it'd probably be better to use custom
> memory functions for the list... btw: if you don't mind please send the
> code for AddToList(), as I'm still not sure I've grasped the scenario,
> it has nothing to do with ClassAct, right?

I've attached the funtion but it does use ClassAct specific calls so it
probably won't be of any use to you. But it sounds like Rod used this
approach for a fix, although I can't get it to compile yet. :(

Jack