Assuming that you are in the RISC OS desktop.
Point your mouse onto the Raspberry symbol at the bottom right corner of the screen. "Left-click" using the mouse. This should open up the RISC OS task window which shows how the ARM's RAM is currently being used within RISC OS.
The "Total" at the bottom of the screen looks like the amount of RAM available to RISC OS on the ARM processor ?? Some of the RPi's total 512Mbytes of RAM will be used by the separate GPU.
If you want to know the total RAM available from within a programme then you need to use a different method.