How to tell if out-of-memory condition is approaching

Mark Schonewille m.schonewille at economy-x-talk.com
Sun Jul 22 10:08:27 EDT 2007


Hi Mark,

You don't need to handle memory issues on Windows, especially in  
these days where we have virtual memory and machinese wirth 2 GB  
built-in memory are considered normal.

If you really want to do something with memory, check out the  
hasMemory function. On Mac, it will report whether the free  
application heap is larger than the value passed to the function.  
This is a bit meaningless but might forecast a crash in extremely  
rare cases.

On Windows, hasMemory seems to create additional virtual memory if  
the value passed to the function is larger than the free system heap.  
This may be useful if you are going to load a Very Large stack into  
memory. You can show a message "please wait", increase the system  
heap, and then load the stack relatively quickly.

Best regards,

Mark Schonewille

--

Economy-x-Talk Consulting and Software Engineering
http://economy-x-talk.com
http;//www.salery.com

Quickly extract data from your HyperCard stacks with DIFfersifier.  
http://differsifier.economy-x-talk.com


Op 22-jul-2007, om 15:42 heeft Mark E. Powell het volgende geschreven:

> I have an app that walks directories and stores data in variables.   
> For extreme trees, available memory can peter out and the app  
> becomes unresponsive.
>
> Firstly, how can I tell that such an out-of-memory condition is  
> approaching?   Secondly, can anyone point me to a white paper,  
> documentation topic, or best practices document that talks  
> generally about how to handle memory issues on Windows?
>
> Many thanks in advance
>
> Mark




More information about the use-livecode mailing list