Page 1 of 1

RAM Usage Reporting

Posted: 01 February 2008, 17:45 PM
by Don_Kirby
The compiler output tells me that my application uses 472 bytes of RAM, but the listing file reports an extra 3112 bytes, for a total of 3584 bytes. I'm assuming that the discrepancy is due to system calls and other internal workings of the virtual machine.

I'm curious though, if the compiler output could reflect this true number, i.e. give me a breakdown of the actual RAM usage rather than just the amount used by the variables in my application.

-Don

Posted: 01 February 2008, 18:16 PM
by mikep
I get this type of output:

Code: Select all

Code: 35 bytes, RAM: 1 byte, Persistent memory: 0 bytes
Target Device: ZX24a, Minimum VM version: v1.1.2
RAM size: 3584, heap size: 256
Did you misread the listing file? Perhaps you can post an example (sans code) so we can see what you mean.

Re: RAM Usage Reporting

Posted: 01 February 2008, 18:18 PM
by dkinzer
Don_Kirby wrote:The compiler output tells me that my application uses 472 bytes of RAM, but the listing file reports an extra 3112 bytes, for a total of 3584 bytes.
Are you perhaps referring to the last line of the .lst file that looks something like this:

Code: Select all

RAM size: 3584, heap size: 256
That is indicating the amount of User RAM that is available, not how much is being used.
Don_Kirby wrote:[Can the compiler] give me a breakdown of the actual RAM usage rather than just the amount used by the variables in my application.
You'll find more information on RAM use in the .map file. For each task, it gives an estimate of the stack space needed. For each routine, it itemized the local variables (that contribute to stack use).

Re: RAM Usage Reporting

Posted: 01 February 2008, 18:22 PM
by Don_Kirby
dkinzer wrote: That is indicating the amount of User RAM that is available, not how much is being used.
That makes much more sense.

-Don