We have been using the Blackfin C++ compiler and VDK and came across an issue with the heap_malloc method within the VDK. Looking at the disassembly of this method there is a code path where heap_malloc can call VDK::PushUnsheduledRegion() when it starts but does not call VDK::PopUnsheduledRegion() when it exits. Can you confirm this?
We have also seen a very similar error in the sys_mbox_trypost() method in sys_arch.c which is part of the Blackfin TCP/IP stack. If you exit retuning the ERR_MEM then the unscheduled region is not poped. This one we can fix because we can edit the source code and we can recompile.