HEAPLIST
-
- Enthusiast
- Posts: 119
- Joined: Tue Feb 21, 2006 12:37 pm
-
- Enthusiast
- Posts: 119
- Joined: Tue Feb 21, 2006 12:37 pm
- tinman
- PureBasic Expert
- Posts: 1102
- Joined: Sat Apr 26, 2003 4:56 pm
- Location: Level 5 of Robot Hell
- Contact:
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
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)
(WinXPhSP3 PB5.20b14)
-
- Enthusiast
- Posts: 119
- Joined: Tue Feb 21, 2006 12:37 pm
- tinman
- PureBasic Expert
- Posts: 1102
- Joined: Sat Apr 26, 2003 4:56 pm
- Location: Level 5 of Robot Hell
- Contact:
OK, then I probably did not understand the use of your code. Apologies.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:
If you paint your butt blue and glue the hole shut you just themed your ass but lost the functionality.
(WinXPhSP3 PB5.20b14)
(WinXPhSP3 PB5.20b14)