In
changest 1178 I've added get_meminfo for lua.
vxworks and dryos cameras without CAM_FIRMWARE_MEMINFO defined currently fall back to the malloc loop
I'd still like a few more dryos testers for CAM_FIRMWARE_MEMINFO before I turn it on globally. The following have been tested and are now on by default: a590, sx20, g12, sx30 and d10.
I plan to add memPartFindMax for vxworks. I'm also going to look into adding the vxworks exmem functions to the sigfinder, it looks like they should match well.
get_meminfo works as follows:
meminfo=get_meminfo([heapname])
get camera memory information
heapname="system" or "exmem" if not given, meminfo is returned for heap used by CHDK for malloc
meminfo is false if the requested heapname isn't valid ("exmem" when exmem is not enabled, or unknown)
otherwise, a table of the form
meminfo = {
name -- string "system" or "exmem"
chdk_malloc -- bool, this is the heap used by CHDK for malloc
chdk_start -- number, load address of CHDK
chdk_size -- number, size of CHDK image
-- all the following are numbers, will not be set if not available
start_address
end_address
total_size
allocated_size
allocated_peak
allocated_count
free_size
free_block_max_size
free_block_count
}
NOTES
* under vxworks and cameras without GetMemInfo only the only valid fields
for the system heap will be those defined by chdk and free_block_max_size
* the meaning of fields may not correspond exactly between exmem and system
edit:
there are some issues with the allocated_size and allocated_peak values in exmem.