AnsweredAssumed Answered

ADSP BF532: Strange result from space_unused()

Question asked by ico on Aug 22, 2011
Latest reply on May 7, 2012 by fvpetrov


I have custom board with two bf532 on it - one is “master” another is “slave”. There is intensive communication between them in command-response manner. Every 50mS or so a packet (between 20-1000 bytes in size) is receved/transmitted from two fifos. These fifos uses dynamic memory allocated from heap. In general every 50 mS there is malloc() and free() calls.

The heap is defined to be at 0x10000 – 0x1fffc in SDRAM – so I have about 64 kBytes heap. Both instruction and data cache are on and heap region is cacheable.

A added some free heap space monitoring - every second there is a call  to space_unused() function and result is printed through rs232 to terminal program.  I expected fluctuating free space around some level below 64 kBytes.

The problem is that space_unused() returns constantly rising heap free space with rate of about 1kByte per 10 sec. This is really strange. There was more than 800 kBytes free space after a couple of hours work time. I can’t figure out why space_unused() returns more free space than the heap itself?

This happens on VDSP 5 update 8.

Thanks in advance for any help.