Finding available memory without shell, how to use hasMemory()

Gabriel Johnson gwjapp at gmail.com
Thu Feb 20 14:07:59 EST 2014


Hey All,

I am working on a program where I need to know the amount of available
memory.

I'm running on OS X and hasMemory() appears to return true/false for the
same values regardless changes to free/available memory. Is there some
trick to getting hasMemory() to correspond with the actual available
memory? Is this possibly something that is being addressed in newer
versions of LiveCode?

As a side note, we would prefer to only use external programs/the shell
sparingly. I've used both top and vm_stat and each appeared to have
presented problems (top seemed to have changed in Mountain Lion and vm_stat
seems to occasionally fail for a reason I haven't yet figured out). If the
shell / external process is the only way then I guess we'll work through it.

Gabe



More information about the use-livecode mailing list