I found another incompatibility between windows 98 and windows 2000. When I use heaptrc…
Show quoted text 7 lines
Throw the winhello based file to me, I'll have a look.

Mailing lists / lazarus / 2003-07
4 messages · 3 people ·
Reply by email Subscribe to this list Your subscription
Read-only archive. Use j and k to move between messages.
I found another incompatibility between windows 98 and windows 2000. When I use heaptrc…
Throw the winhello based file to me, I'll have a look.
Hi,
I found another incompatibility between windows 98 and windows 2000. When I use heaptrc on lazarus or the examples, it crashes with an access violation. On windows 2000 there is no problem.
The crash takes place in the WindowProc function in win32callback.pp. Recently a TLMInsertText variable was added. It contains an ansistring, which means an exception block is added to the function and also some memory from the heap is located.
On windows 2000, no access violation is created, but heaptrc reports that not all memory is released:
Heap dump by heaptrc unit
146 memory blocks allocated : 592/1184
146 memory blocks freed : 584/1168
0 unfreed memory blocks : 8
True heap size : 262144 (80 used in System startup) True free heap : 261936
Should be : 262048
Shall I report this to the fpc buglist? It can be shown to happen also in a slightly modified version of the winhello demo program shipped with fpc.
Vincent.
Ansistrings deallocated in the exit code of the main program are handled improperly by the heaptrc unit because the check for unreleased blocks is done before these strings are deallocated.
I found another incompatibility between windows 98 and windows 2000. When I use heaptrc…
That is not the problem. Even allocating a longint and de-alocating it immediately afterwards with new and dispose in the winproc function, causes this problem. I think it has to do with creating the caller address from this callback (I suspect it crashes in get_caller_addr).