Stack size

FlexibleLearning admin at FlexibleLearning.com
Tue Nov 23 17:55:18 EST 2010


Thank you Jacque... Forgot about that one. Had half-remembered it as a
compatibility-only function, but we'll give it a try. We were getting a
'cannot find stack' error which actually meant 'cannot fully load this
stack', as well as no graceful result that memory is running low; just a
suddenly non-responsive stack. I think a bit of work is needed at the upper
end of memory limits.

Hugh Senior
FLCo


On 11/23/10 3:04 AM, FlexibleLearning wrote:
> As data is added to a particular stack, LiveCode runs the risk of running
> out of memory. Has anyone figured out how to check this programmatically,
or
> is it a question for Edinburgh?

I'm not sure you can do it exactly. You could check the size of the file
on disk, add an estimated percentage for miscellaneous overhead, and
then use the hasMemory() function to find out the memory still
available. The docs have some caveats on using that function, so read
those. There may be a shell call you could use instead.

But I think the engine should be swapping the file to virtual memory as
needed, and to be honest, I've never seen a stack that won't open. But
my stacks aren't all that huge.

--
Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com





More information about the use-livecode mailing list