ReAllocateMemory-WinXP~Win98(PB4/3.94)
Posted: Fri Feb 17, 2006 4:01 am
My original topic:
forums.purebasic.com/german/viewtopic.php?p=77544#77544
I don`t speak englisch. Only some words.
I found a bug in PB4 beta 3 an PB3.94 under Windows98. I don`s know whether it an Bug of Windows or PB.
The Memory-Pointer (ID) of ReAllocateMemory() increases up to 2 GB oder over 2 GB. That don`t work. In WindowsXP exists no error.
[edit] Code was edit: "size.l" change to "32*i"
debug Windows98(debugger):
Toshy
forums.purebasic.com/german/viewtopic.php?p=77544#77544
I don`t speak englisch. Only some words.

I found a bug in PB4 beta 3 an PB3.94 under Windows98. I don`s know whether it an Bug of Windows or PB.
The Memory-Pointer (ID) of ReAllocateMemory() increases up to 2 GB oder over 2 GB. That don`t work. In WindowsXP exists no error.
[edit] Code was edit: "size.l" change to "32*i"
Code: Select all
OpenConsole()
PrintN("start") : Debug "start"
*MEM = AllocateMemory(16)
*MEM2
StartTime.l
For i = 1 To 800000 ; *1000
If ElapsedMilliseconds()-StartTime > 1000
PrintN("Ausgabe sekndlich | i="+Str(i) +" | *MEM=" + Str(*MEM ) )
Debug "*MEM=" + Str(*MEM )
StartTime = ElapsedMilliseconds()
EndIf
*MEM2 = *MEM
Repeat
*MEM = ReAllocateMemory(*MEM2, 32*i) ; man kann auch nur "i" nehmen
If *MEM = 0
PrintN("_ReAllocateMemory()-Error | i=" + Str(i) + " | Size=" + Str(32*i) + " | *MEM2=" + Str(*MEM2) )
Debug "_ReAllocateMemory()-Error | i=" + Str(i) + " | Size=" + Str(32*i) + " | *MEM2=" + Str(*MEM2)
Delay(5000)
EndIf
Until *MEM <> 0
Next i
PrintN("ende") : Debug "ende"
For i = 1 To 600
Delay(100)
Next i
CloseConsole()
debug Windows XP(console):start
*MEM=8978444
*MEM=189857804
*MEM=372899852
*MEM=563019788
*MEM=754909196
*MEM=943521804
*MEM=1132724236
*MEM=1322123276
*MEM=1505951756
*MEM=1694564364
*MEM=1887895564
*MEM=2080047116
_ReAllocateMemory()-Error | i=184192 | Size=5902336 | *MEM2=2133131276
Byestart
Ausgabe sek³ndlich | i=1 | *MEM=3350160
Ausgabe sek³ndlich | i=34560 | *MEM=6422560
Ausgabe sek³ndlich | i=43904 | *MEM=6750240
Ausgabe sek³ndlich | i=52736 | *MEM=5308448
Ausgabe sek³ndlich | i=58112 | *MEM=7208992
Ausgabe sek³ndlich | i=64128 | *MEM=7405600
Ausgabe sek³ndlich | i=68224 | *MEM=7536672
Ausgabe sek³ndlich | i=72832 | *MEM=7667744
Ausgabe sek³ndlich | i=77056 | *MEM=5308448
Ausgabe sek³ndlich | i=80640 | *MEM=5308448
Ausgabe sek³ndlich | i=84096 | *MEM=10747936
Ausgabe sek³ndlich | i=87808 | *MEM=8126496
Ausgabe sek³ndlich | i=92288 | *MEM=11272224
Ausgabe sek³ndlich | i=96896 | *MEM=8454176
Ausgabe sek³ndlich | i=100608 | *MEM=5308448
Ausgabe sek³ndlich | i=103936 | *MEM=8650784
Ausgabe sek³ndlich | i=107520 | *MEM=8781856
Ausgabe sek³ndlich | i=109824 | *MEM=5308448
.....
....
Toshy