discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Memory usage of GNUstep processes


From: Vaisburd, Haim
Subject: RE: Memory usage of GNUstep processes
Date: Fri, 14 Dec 2007 12:35:44 -0800

>>> "After free() is executed, this space is made available for further 
>>> allocation by the application, though not returned to the system.
>>> Memory is returned to the system only upon termination of the 
>>> application."

>> Thanks for this info!!! That is general unix behaviour or do Solaris,

>> MacOSX, Linux,... have a different flavour of handling these kind of 
>> things?

> All have different flavours - I only recently found out that FreeBSD
> actually returns the memory to the kernel for feallocation after
calling free().

As far as I understand, it depends on the implementation of the memory
allocator.
I did not find any working examples, but I think that allocator using
mmap()
system call to get memory from OS and caring to call munmap() when the
chunk is
no longer nesessary would return the memory back. Thus any modern Unix
would be
able to do that.

Solaris has mapmalloc library. Its manual page hints that allocator from
standard
C library uses sbrk() to get memory, so returning it back is impossible
in this case.

--Tima







reply via email to

[Prev in Thread] Current Thread [Next in Thread]