[comp.sys.next] /bin/sh memory usage

hoodr@syscube.csus.edu (Robert Hood) (01/13/90)

I don't know if this has been discused before but....

Why does /bin/sh allocate 8.63 Mbytes of memory?!  What does this do to
the performance of the NeXT?  /bin/csh only allocates 1.01 Mbytes.  On
all of the other Unix machines I looked at, none of them came even close
to wanting a megabyte of memory.

----------------------------------------------------------------------------
 Robert Hood  --  California State University: Sacramento   (916) 278-7402
 INTERNET: hoodr@csus.edu <-- NeXT mail too!    BITNET: hoodr@CALSTATE
 UUCP: ...!ucdavis!csusac!hoodr

gerrit@nova.cc.purdue.edu (Gerrit) (01/13/90)

In article <1990Jan12.234114.28192@csusac.csus.edu> hoodr@syscube.csus.edu (Robert Hood) writes:
>I don't know if this has been discused before but....
>
>Why does /bin/sh allocate 8.63 Mbytes of memory?!  What does this do to
>the performance of the NeXT?  /bin/csh only allocates 1.01 Mbytes.  On
>all of the other Unix machines I looked at, none of them came even close
>to wanting a megabyte of memory.

Never believe everything you glean from ps(1) on a NeXT machine.  Keep in
mind that while in many respects Mach looks like Unix, it isn't.  It
emulates Unix almost perfectly in most of its current implementations.
However, it's virtual memory system is quite different, and what ps(1) is
reporting is the number of pages it might map if they were demanded.
Mach only creates and really reads in the pages that are accessed.
I'd suggest picking up the Mach documents from CMU to see what is really
happening.  I haven't seen one that explicity describes how the kernel
maps in the text and data segments, but the paper on the virtual memory
stuff is pretty good and gives you a feeling for what is happening.

The thesis, though, is that ps(1) under Mach doesn't really report
the same things as ps(1) under most other versions of Unix when it
comes to allocated space.

gerrit