[net.unix-wizards] How to Increase User Virtual Memory Allocation ?

dan@NADC.ARPA (06/15/84)

Hello,

I want to rebuild our UNIX 4.1 BSD system to allow a user process that
requires just under 9M bytes of memory to run.  Size tells me the
following.

         text   data        bss      dec     hex
	36864	5120	8926304	 8968288  88d860

The write up on page 21 of the Installing/Operating 4.1bsd leaves some
information to be desired.  I can see that I have to increase "MAXDSIZ".
What do I have to change in "dmap.h" and "text.h".   What changes do I
have to make to confhp.c? I do have the line "config    hphp vmunix" in
the in system configuration file. The primary swap area is hp0b and the
and the alternate is hp1b (16M + 16M).  The entry /dev/hp1b::sw:: is in
/etc/fstab.

What other changes do I have to make?

What commands (like ps and w ) have to be recompiled?

				Thanks,
				Dan Tarrant (AV 441-3985)
   					    (Comm 215-441-3985)

guyton@RAND-UNIX.ARPA (06/15/84)

From:  Jim Guyton <guyton@RAND-UNIX.ARPA>

Here are some notes that I made from a paper on how to do
this written by the folks at USC-ISI.  They had to figure
out how to do it in order to run reasonably sized Vax
Interlisp programs ....

-- Jim

--------------------Forwarded notes

Change DMMIN and NDMAP in h/dmap.h

#define NDMAP 24                /* Was 16 */
#define DMMIN 128               /* Was 32 */

in h/vmparam.h

#define MAXDSIZ (22*1024-128-SLOP)
#define MAXSSIZ (22*1024-128-SLOP)

Some explaination from the Interlisp notes:
--------------
  DMMIN is increased by 400% to enlarge the minimum allocation
(for data and stack) per process.  NDMAP is increased by 50% to
enlarge the total number of allocations per process.  Thus, for
data or stack segments, a process is initially given a chunk of
128 (DMMIN) blocks.  If necessary, a subsequent chunk of 256,
then 512, and finally 1024 blocks is given.  The last chunk size
of 1024 (DMMAX) block is repeatedly allocated 21 times, if
necessary, until 24 (NDMAP) allocations are made in all.


  MAXDSIZ and MAXSSIZ are increased by 182% to enlarge the total
allocation (for data and stack) per process.  This patch must be
made in conjunction with the above change to dmap.h

  MAXDSIZ and MAXSSIZ can each comprise 21 1024-block-chunks, plus
chunks of size 128, 256, and 512.  The aggregate of the latter
chunks is equivalent to 1024-128.  Hence, the maximums

	21*1024 + (1024-128) = 22*1024-128.

-------------

They then even give a short C pgm that calculates it as a function
of DMMIN, DMMAX and NDMAP.  Basically, it just starts with DMMIN,
doubles the block size each time until it reaches DMMAX, and continues
with DMMAX until NDMAP total allocations have been made.

--------------------End of old notes