Re: [BLACKBOX] Why BlackBox consumes 80% of its virtual address space at startup?

From: [at]} <Romiras>
Date: Wed, 29 Jun 2011 17:36:30 +0300


whats-the-differences-between-virtualalloc-and-heapalloc <http://stackoverflow.com/questions/872072/whats-the-differences-between-virtualalloc-and-heapalloc>

The possible answer on first question ("why 1.6 GB") is: just as guess, because Oberon microsystems might be used it on servers with large enough RAM for these tasks. May be to avoid fragmentation. Still, its only a virtual memory.

Module Kernel:

PROCEDURE AllocHeapMem (size: INTEGER; VAR c: Cluster);



(* allocate at least size bytes, typically at least 256 kbytes are allocated *)


CONST M = 1536 * 100000H; (* 1.5 GByte *)


CONST N = 65536; (* cluster size for dll *)



The possible answer on second question is: check implementation of RTS in Kernel and fix that if need. :)


2011/6/29 shristov <shristov{([at]})nowhere.xy


Using the Proces Explorer utility from the former SysInternals (on Windows XP SP2, 3 GB RAM),
I've determined that BlackBox 1.5 consumes 1,621,816 K (~1.6 GB!) of its virtual address space
(not to be confused with page file) at startup. This is with few small CP source documents open,
but no other activities. The physical memory consumed is only ~7 MB (didn't remember exactly).

The main question is: why 1.6 GB??? Can it be decreased somehow?

The remaining ~0.4 GB of the virtual space appears fragmented,
and the maximum piece of the virtual space that a module can use is ~300 MB.

Running a module increases both the virtual space and the physical memory
consumption according to module's requirements.

When a module gets unloaded, the physical memory is released, but the virtual space isn't.
So, the virtual space usage increases steadily from 1.6 GB to 2 GB and then the system becomes unusable.
The maximum virtual address space consumption was 2,082,496 K, which is very close
to the "theoretical" 2 GB per process limit.

The second question, therefore, is:
can the virtual space be released whenever the physical space is released?

The first question is, of course, much more important.


Sinisa


----
To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to LISTSERV{([at]})nowhere.xy---- To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to LISTSERV{([at]})nowhere.xy
Received on Wed Jun 29 2011 - 16:36:30 UTC

This archive was generated by hypermail 2.3.0 : Thu Sep 26 2013 - 06:30:12 UTC