Re: allocate() and free()

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

free() does not give memory back to the operating
system. It simply puts it into a pool of free memory
that's controlled by Euphoria. It will be used by future
calls to allocate().

When the pool is exhausted, allocate() will get
more memory from the operating system, but
free() will never give it back.

I don't know of any language that gives
heap space back to the operating system.
It would be a tricky business, since you can
theoretically only give back space at the end
of the heap, not an arbitrary piece in the middle
somewhere.

In Windows, this is all virtual memory anyway.
The operating system can swap out pages
of memory that aren't being actively used,
to make room for active programs to run.

Regards,
   Rob Craig
   Rapid Deployment Software
   http://www.RapidEuphoria.com

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

Search



Quick Links

User menu

Not signed in.

Misc Menu