Re: allocate() and free()

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

Derek Parnell writes:
> Rob Craig writes:
>> I don't know of any language that gives
>> heap space back to the operating system.
>
>The Amiga OS does.
>
> ...The release_mem() routine gives back
> the memory to Windows for other applications to use.

release_mem() appears to call Euphoria's free().
Euphoria's free() calls C's free(), which does not
give the memory back to the operating system.
The memory stays in the heap, ready for use
within the same Euphoria program (either for
calls to allocate(), or for creating new sequences etc.)
C programs on the Amiga or any other system
would likely work the same way. The heap memory
used by C's malloc() and free() is not returned to the
O/S until the application terminates. It's not practical
for any O/S to take back a small piece of memory
from the middle of your address space.

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