DS 2.2.1 Heap Memory Status Window


#1

Hi All,

Can anyone provide some information on the ‘-- free block --’ entries in the Heap Memory Status window in DS2.2.1?

Are they:
Free blocks that haven’t been dealt with by the Garbage Collector
or
Memory Leaks (i.e. pointer has gone out of scope before being released)?

Thanks, Dave


#2

There is no garbage collector in Open AT OS; memory blocks can’t be moved as long as they are still allocated.
The free blocks are just memory blocks which have been freed (with adl_memRelease function).
Memory leaks can’t be detected with free blocks, since in this case the concerned blocks are still allocated (and never freed) blocks.


#3

Hi Daav,

Thanks for the quick response.

So does this mean that over a long period of time the heap memory will become fragmented due to some blocks not being de-allocated for long periods of time?

If this is the case, will openAT eventually exception when adl_memGet() can’t get a requested block size because there are many free small blocks?

ciao, Dave


#4

Unfortunately, yes to both questions.
That’s why the memory management of the application has to be designed carefully, with the help of this Heap Memory view to get a snapshot of the memory allocations.