home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / sys / sun / misc / 4104 next >
Encoding:
Internet Message Format  |  1992-09-07  |  1.6 KB

  1. Xref: sparky comp.sys.sun.misc:4104 comp.sys.sun.apps:1838
  2. Newsgroups: comp.sys.sun.misc,comp.sys.sun.apps
  3. Path: sparky!uunet!mcsun!sunic!psinntp!psinntp!xilinx!holen
  4. From: holen@xilinx.com (Victor A. Holen )
  5. Subject: Summary: too much memory
  6. Message-ID: <1992Sep3.214851.28886@xilinx.com>
  7. Sender: usenet@xilinx.com
  8. Organization: Xilinx Inc.
  9. Date: Thu, 3 Sep 1992 21:48:51 GMT
  10. Lines: 39
  11.  
  12. Thanks to all that responded. Since there was some interest, this is a short
  13. summary.
  14.  
  15. I've asked:
  16. > Is there a way to tell SunOS to pretend it has less physical memory
  17. > then it has ? (Without yanking the chips).
  18. ======
  19. From: barmar@think.com (Barry Margolin)
  20.  
  21. Write a program that mallocs 16Mb, calls plock(2) to lock its data segment
  22. into physical memory memory, and then goes to sleep.  That 16mb will be
  23. unavailable to any other process, so you will effectively have reduced the
  24. physical memory of the system.
  25.  
  26. Naturally, this program needs to run as root.
  27.  
  28. =====
  29.  filipski@cs.buffalo.ed  and  andyfe@utoday.com
  30. suggest writing a program that malloc's and than uses  mlock(3)
  31.  
  32. =====
  33.  
  34. Mark.Monger@Eng.Sun.COM (Mark Monger) and   barmar@think.com (Barry Margolin)
  35. suggest patching physmem.  (combined and edite response):
  36.  
  37. adb -w -k /vmunix /dev/mem
  38. physmem/X
  39. _physmem:     xxxxx    (reports physical memory in pages)
  40. physmem?W 0x1000       (That's 0x1000 pages * 0x1000B/page = 16MB of memory)
  41. ^D
  42.  
  43. Rebooting is necessary.
  44.  
  45. You might want to save the kernel before you do this.
  46.  or
  47. Just patch physmem back to 0 for normal operation.
  48. ==============
  49. -- 
  50.  victor ....  ___  ._..  .  _.     holen@xilinx.com
  51.