Hello everybody,
I am using the double linked list, and if I allocate too many of them, my program crashes (when I am asking for one more linked list)
By the way, I am not using PureBasic's linked list, but David McMinn's, and it crashes when HeapCreate_ is called.
Do you have any workaround for this?
Thanks,
Tony
HeapCreate and David McMinn's Double Linked Lists
- tinman
- PureBasic Expert
- Posts: 1102
- Joined: Sat Apr 26, 2003 4:56 pm
- Location: Level 5 of Robot Hell
- Contact:
Re: HeapCreate and David McMinn's Double Linked Lists
No, because I wasn't aware of any problems. They work OK for me, but then I don't use many at once. If you mail me some code that you are using then I can perhaps get a better idea about what is wrong.tony wrote:Do you have any workaround for this?
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)
XIncludeFile "double_linked_lists.pb"
#MAX_LIST = 66000
Dim list.ListHeader(#MAX_LIST)
For k = 0 To 66000
dll_NewList(list(k), 4)
Next
-----
It defeats the purpose of having linked lists of linked lists. The problem is that you use a separate heap for every linked list, and I think windows doesn't like having too many call of HeapCreate_()
#MAX_LIST = 66000
Dim list.ListHeader(#MAX_LIST)
For k = 0 To 66000
dll_NewList(list(k), 4)
Next
-----
It defeats the purpose of having linked lists of linked lists. The problem is that you use a separate heap for every linked list, and I think windows doesn't like having too many call of HeapCreate_()
- tinman
- PureBasic Expert
- Posts: 1102
- Joined: Sat Apr 26, 2003 4:56 pm
- Location: Level 5 of Robot Hell
- Contact:
The error I get is that there is not enough memory to allocate the new heap, rather than anything specific about too many calls to HeapCreate_(). I will look for a decent way to not require a new heap for each linked list.tony wrote:It defeats the purpose of having linked lists of linked lists. The problem is that you use a separate heap for every linked list, and I think windows doesn't like having too many call of HeapCreate_()
Thanks.
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)
- tinman
- PureBasic Expert
- Posts: 1102
- Joined: Sat Apr 26, 2003 4:56 pm
- Location: Level 5 of Robot Hell
- Contact:
It should be fixed now. I just hacked out the heap stuff and replaced it by global stuff, because I'm not going for elegance here.
Should be on the resources site soon and my site now.
Thanks again tony.
Should be on the resources site soon and my site now.
Thanks again tony.
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)