« Reply #1 on: 04 / February / 2013, 07:32:09 »
Hi,
I want to find the free RAM (MB) on my card so I can shut down my script when it gets full.
I tried this in Lua
function get_free_ram()
meminfo=get_meminfo()
return(meminfo.free_size)
end
but I get a value of 760,000 (bytes?) on an empty 32GB card.
Any ideas on how to get the same value that CHDK shows on the LCD?
many thanks
Dave
RAM is not the same as SD storage.
You need to use the get_free_disk_space() function.
Phil.

Logged
CHDK ports:
sx30is (1.00c, 1.00h, 1.00l, 1.00n & 1.00p)
g12 (1.00c, 1.00e, 1.00f & 1.00g)
sx130is (1.01d & 1.01f)
ixus310hs (1.00a & 1.01a)
sx40hs (1.00d, 1.00g & 1.00i)
g1x (1.00e, 1.00f & 1.00g)
g5x (1.00c, 1.01a, 1.01b)
g7x2 (1.01a, 1.01b, 1.10b)