I’ve searched the documentation to find the actual RAM size on the M1306B and how I can the determine the memory usage. I’ve used the wm_osGetRamInfo, but its unclear in the documentation the returned values actually represent.
According to the documentation, this function returns:
// Memory information structure
u32 TotalSize; // Total RAM size
u32 StackSize; // Call stacks size
u32 HeapSize; // Heap memory size
u32 GlobalSize; // Global variables size
The problem is, what does it actually say. Eg. if you subtract
Total size - (heap+stack+global) = 0
This should indicate that my memory consumption+plus available memory is represented, but which values represent what?
If I add a large global buffer (eg 2000 bytes) the heap size is increased by 2000 bytes while the stack size is decreased with 2000 bytes.
Does this mean that the heap size is my memory consumption, and that the stack size is available memory.
All I want to know is my memory consumption (code size + allocated memory) and available space.
Anybody enllight me please.