[Info-vax] Memory Management (was Re: Running Alpha VMS under the ES40 emulator)
Johnny Billquist
bqt at softjar.se
Mon Oct 14 05:34:58 EDT 2013
On 2013-10-14 05:30, JF Mezei wrote:
> On 13-10-13 22:06, Johnny Billquist wrote:
>
>> Indeed. But if you look with top, or other system tools, at the virtual
>> memory size, this memory is in there. Which is why you should not
>> necessarily put too much significance in how much virtual memory a
>> process have allocated.
>
>
> A properly written browser would have it "locally" release all memory
> associated with a web page when that tab is closed. This may not be
> reflected in the process virtual memory.
>
> And when a new tab and web page is opened, that locally released memory
> can be re-used to build the new web page display, thus no need to go to
> the OS and request more memory be allocated to the process.
That's the general theory. However, it can fail in rather stupid ways.
For example:
Allocate chunk A, 10 KB
Allocate chunk B, 10 KB
Free chunk A.
Allocate chunk C, 1 KB
Allocate chunk D, 10 KB.
Free chunk C.
Note how the virtual memory requirements grew by 10KB, even though you
actually are only using the same amount as after A and B had been
allocated. And it actually grew by 10K even though at any one time the
requirements were never more than 1K more than after A and B had been
allocated.
> BUT, when a process fails to locally deallocate memory, its local free
> pool is too small to allow for a new page to be displayed, at which
> point, the process asks the OS for more virtual memory.
It can also be freeing, but allocation requires the free list to have
large enough contiguous chunks of memory to satisfy the allocation
request, or else the OS have to give more, even if you actually have
plenty of memory in the free list.
Fragmentation is a big issue.
Johnny
--
Johnny Billquist || "I'm on a bus
|| on a psychedelic trip
email: bqt at softjar.se || Reading murder books
pdp is alive! || tryin' to stay hip" - B. Idol
More information about the Info-vax
mailing list