[Lazarus] Memory usage of fpc resources versus lrs resources. Help to understand heaptrc output

Luiz Americo Pereira Camara luizmed at oi.com.br
Sun Oct 2 14:31:13 CEST 2011


Hi,

I have a project with 55 forms / frames / modules that used the old lrs 
includes to load resources

Now i decided to change to the new fpc resources 
http://lazarus-dev.blogspot.com/2010/02/work-on-0930-changes-in-resource.html

The new fpc resources based binary is two kilobytes smaller. OK

I used the heaptrc to see if the memory usage is different.

The number of memory blocks is smaller (46300 vs 47677) with the new 
resource handling but the heap size is a lot bigger (1474560 vs 458752)

Any reasons why this occurs?

I understand that the fpc memory manager  reserved more memory (heap 
size) in bigger memory blocks. Is that right?



Follows complete log

D:\work\lazarus\bliksys_hosp\apps\master\bliksys.lrs.exe
Heap dump by heaptrc unit
47677 memory blocks allocated : 7234776/7359232
47677 memory blocks freed     : 7234776/7359232
0 unfreed memory blocks : 0
True heap size : 458752
True free heap : 459008
Should be : 458752

D:\work\lazarus\bliksys_hosp\apps\master\bliksys.lfm.exe
Heap dump by heaptrc unit
46300 memory blocks allocated : 7078721/7201520
46300 memory blocks freed     : 7078721/7201520
0 unfreed memory blocks : 0
True heap size : 1474560
True free heap : 1474768
Should be : 1474560

Luiz






More information about the Lazarus mailing list