Page 1 of 1

HEAPLIST

Posted: Thu Jan 24, 2008 8:28 pm
by hellhound66
Closed.

Posted: Thu Jan 24, 2008 10:16 pm
by hellhound66
Removed.

Posted: Fri Jan 25, 2008 11:48 am
by tinman
I did the same thing when I wrote my own linked list routines for PB. Unfortunately, another user pointed out that creating lots of linked lists based on their own heap was a bad idea (it used more system resources than just allocating memory normally).

I'll see if I can find the explanation.

Edit: See here: http://www.purebasic.fr/english/viewtop ... inked+list

Posted: Fri Jan 25, 2008 12:30 pm
by hellhound66
Removed.

Posted: Fri Jan 25, 2008 12:48 pm
by tinman
hellhound66 wrote:I don't know, what you mean.
I don't get the link between the problem discussed in the posted thread and my heap list. I use a heap list to prevent the threads' problem. I am only using one linked list (sorry, I don't want to convert my dynamic array template from C++ to PB) for one heap list. Depending on the size of the data blocks, not much linked list entries were used in a heap list. Further on you can modify the constants to enlarge the heap blocks allocated.

And the most important matter is that I don't use a newe heap, but only use a memory block allocated with AllocateMemory() :wink:
OK, then I probably did not understand the use of your code. Apologies.

Posted: Fri Jan 25, 2008 1:11 pm
by hellhound66
Removed.