Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!zaphod.mps.ohio-state.edu!wuarchive!mailrus!bcm!rice!sun-spots-request From: mojo@legato.com (Joseph Moran) Newsgroups: comp.sys.sun Subject: Re: Using only part of physical memory Keywords: Miscellaneous Message-ID: <10317@brazos.Rice.edu> Date: 26 Jul 90 02:44:14 GMT Sender: root@rice.edu Organization: Sun-Spots Lines: 29 Approved: Sun-Spots@rice.edu X-Refs: Original: v9n277 X-Sun-Spots-Digest: Volume 9, Issue 281, message 9 Originator: spots@titan.rice.edu In article <10131@brazos.Rice.edu> roy@alanine.phri.nyu.edu (Roy Smith) writes: >Is there any easy way to tell SunOS to only use a fraction of the >available physical memory? To do this you need to patch the kernel's "physmem" variable to be the maximum number of pages you want the system to use. If physmem is 0 at boot time (the normal case), then the kernel uses the memory as sized by the PROM monitor. If physmem is larger than the number of pages found by the monitor, the kernel uses the smaller of the two numbers. Remember that for the sun3, sun3x, and sun4 architectures, the page size is 8k (0x2000) while for the "sun4c" architectures (SPARCstation 1's, and SLC's) the page size is 4k (0x1000). For example, if you want to use only 6 Mb on a 8 Mb Sun-3 system, patch physmem to be 0x600000 / 0x2000 = 0x300. You can do this with adb as shown here. machine# cp /vmunix /vmunix.orig machine# adb -w /vmunix - physmem?W 600000%2000 _physmem: 0x0 = 0x300 $q machine# fastboot Joseph Moran Legato Systems Inc. mojo@Legato.COM or {sun,uunet}!legato!mojo