[Info-vax] Running Alpha VMS under the ES40 emulator

Simon Clubley clubley at remove_me.eisner.decus.org-Earth.UFP
Sun Oct 13 15:08:51 EDT 2013


On 2013-10-13, David Froble <davef at tsoft-inc.com> wrote:
> Johnny Billquist wrote:
>
>> Memory usage and allocation patterns in most programs means that it's 
>> easy to allocate new chunks of memory, but it is hard to ever return any 
>> memory to the OS.
>> The OS never reclaims anything until the program exits. Programs 
>> explicitly have to give the memory back to the OS. Normal memory 
>> allocation routines don't return any memory to the OS. They keep it 
>> around for later. (And because it is damned hard to return the memory.)
>
> I'm going to object to such a statement.  Freeing memory is easier than 
> acquiring it.  Now, determining what can be freed may be a tougher job.
>

I think Johnny's point is that in some environments (it's operating system
and programming language support environment specific), once memory is
mapped into virtual address space it tends to stay mapped into virtual
address space even if, say, free() indicates at C RTL level that the
memory is no longer required.

I don't have a problem with that argument at a conceptual level although
I have not investigated how true it is for Linux and glibc. I _do_ have a
general problem with Firefox not reusing the newly available memory
released after a tab or window is closed and instead deciding to allocate
yet more memory. (At least, that's the behaviour as it appears to me.)

Simon.

PS: A thought just occurred to me: what if part of the problem is that
some released memory is too fragmented (at a virtual address space level)
to use again because of poor memory management and that's what is causing
Firefox to expand it's memory usage ?

-- 
Simon Clubley, clubley at remove_me.eisner.decus.org-Earth.UFP
Microsoft: Bringing you 1980s technology to a 21st century world



More information about the Info-vax mailing list