03-14-2021, 11:37 AM
You can try to get the memory used within the heap (which is the area for dynamic memory) with the library <alloc.bas>
On the other hand, if you want to see how memory is organized within a ZX Basic compiled program, use --mmap as @georgeo suggested. :-)
Code:
#include <alloc.bas>
PRINT memavail() ' Total HEAP free memory (might be fragmented in 2 or more blocks...)
PRINT maxavail() ' Size of the largest free contiguous single memory block
On the other hand, if you want to see how memory is organized within a ZX Basic compiled program, use --mmap as @georgeo suggested. :-)