Re: allocate() and free()
- Posted by Robert Craig <rds at RAPIDEUPHORIA.COM> Dec 01, 2000
- 514 views
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