HEAPLIST

Share your advanced PureBasic knowledge/code with the community.
hellhound66
Enthusiast
Enthusiast
Posts: 119
Joined: Tue Feb 21, 2006 12:37 pm

HEAPLIST

Post by hellhound66 »

Closed.
Last edited by hellhound66 on Sun Mar 09, 2008 10:33 pm, edited 1 time in total.
hellhound66
Enthusiast
Enthusiast
Posts: 119
Joined: Tue Feb 21, 2006 12:37 pm

Post by hellhound66 »

Removed.
Last edited by hellhound66 on Wed Mar 19, 2008 11:43 pm, edited 1 time in total.
User avatar
tinman
PureBasic Expert
PureBasic Expert
Posts: 1102
Joined: Sat Apr 26, 2003 4:56 pm
Location: Level 5 of Robot Hell
Contact:

Post 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
If you paint your butt blue and glue the hole shut you just themed your ass but lost the functionality.
(WinXPhSP3 PB5.20b14)
hellhound66
Enthusiast
Enthusiast
Posts: 119
Joined: Tue Feb 21, 2006 12:37 pm

Post by hellhound66 »

Removed.
Last edited by hellhound66 on Wed Mar 19, 2008 11:43 pm, edited 1 time in total.
User avatar
tinman
PureBasic Expert
PureBasic Expert
Posts: 1102
Joined: Sat Apr 26, 2003 4:56 pm
Location: Level 5 of Robot Hell
Contact:

Post 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.
If you paint your butt blue and glue the hole shut you just themed your ass but lost the functionality.
(WinXPhSP3 PB5.20b14)
hellhound66
Enthusiast
Enthusiast
Posts: 119
Joined: Tue Feb 21, 2006 12:37 pm

Post by hellhound66 »

Removed.
Post Reply