[lazarus] heaptrc on win98

Florian Klaempfl Florian.Klaempfl at gmx.de
Thu Jul 31 10:20:06 EDT 2003


Vincent Snijders wrote:
> 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.

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.







More information about the Lazarus mailing list