Re: Memory: how much left?

new topic     » goto parent     » topic index » view thread      » older message » newer message

Jacques Guy writes:

> Alas, after shrinking, a call to FreeXMS
> returns the same amount of free memory as before shrinking. Yet,
> periodically shrinking my sequences prevents Euphoria resorting
> to virtual memory. So, Euphoria must know something that FreeXMS
> doesn't, or...?

When you shrink a variable, Euphoria puts the free space
into a pool of storage that it can use in the future.
It doesn't try to return the space to the operating system,
thus FreeXMS won't report that more space is available.

> I am lost. All I want to do is avoid the use of virtual
> memory. Is there any way of telling when Euphoria is
> about to resort to virtual memory?

If you are running under plain DOS you can prevent
virtual memory (swap space) from being used with:

SET CAUSEWAY=NOVM

In general, I don't know of any good way of detecting
when Euphoria (or any other language) is using or is
about to use virtual memory. Under Windows, the operating system
manages the use of virtual memory. It's a good question though.
I suppose if you measure the time() that it takes to do some
repetitive task, and notice when the time starts to become
much worse, it might indicate that you were now starting
to swap pages of memory to/from disk.

Regards,
     Rob Craig
     Rapid Deployment Software
     http://members.aol.com/FilesEu/

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu