/bin/sh and memory allocation

Nik Simpson nik at b11.ingr.com
Mon Nov 27 21:31:50 AEST 1989


Some weeks ago I remember somebody posting a query concerning a
error message from the Kernel on SVR3.2 system,  I think the message was
of the for

        getcpages() not enough memory to allocate 1 page

        If that was not the message then I would ignore the rest of this
message.



        I recently saw this behaviour,  the cause was not one of those
mentioned in response to the original article (I don't think).  In this
case the cause was the eccentric memory management scheme of the standard
/bin/sh.  Put simply "sh"  traps memory faults and assumes the cure
is to allocate some more memory and restart the faulting instruction.
This is great if the fault was really one requiring more memory,  if not
the fault is generated again and more memory allocated
until there is no more memory to allocate.  The solution was to change
the script to use /bin/ksh if you have it.

        For more information see

        "A Partial Tour Through the UNIX Shell"
        by Geoff Collyer
        USENIX (Winter 89)


|-----------------------------------------------------------------------------|
|  Nik Simpson  UUCP :  uunet!ingr!swndn!st_nik!nik                           |
|  Senior Systems Engineer.     Intergraph UK Ltd.                            |
|                                                                             |
|  Disclaimer : I'm a Reduced Instruction Set Person,  I do lots of simple    |
|               things and make them look complicated.                        |
|-----------------------------------------------------------------------------|



More information about the Comp.unix.wizards mailing list