Freememory() in thread with debugger enabled
Posted: Thu Jan 22, 2009 9:25 pm
I had a memory leak in my code when debugging and i managed to isolate it to this:
Program runs until it fills pagefile (total size ~17GB on my pc, this program fills it with 15GB, with x86 version of purebasic it fills with 2GB (x86 limit per process)) and FreeMemory() is ignored:

If debugger is disabled then all is working as expected.
Any tips how to debug my program?
Is this possibly bug in pb compiler?
I'm sorry if same question is already asked
Thanks
Code: Select all
Procedure MemoryOperation(*MemoryID)
FreeMemory(*MemoryID)
EndProcedure
For i=0 To 50000
*MemoryID = AllocateMemory(50)
CreateThread(@MemoryOperation(),*MemoryID)
Next

If debugger is disabled then all is working as expected.
Any tips how to debug my program?
Is this possibly bug in pb compiler?
I'm sorry if same question is already asked

Thanks