Contiguous address spaces

Robert English renglish at hpisod1.HP.COM
Sat Oct 15 06:31:15 AEST 1988


/ chip at ateng.ateng.com (Chip Salzenberg) /  6:05 pm  Oct 13, 1988 /

> Can you say "catch SIGSEGV, call sbrk() and retry"?  I knew you could.

The sh behavior which is (or was at one time) appalling was its
implicit assumption that memory was contiguous and grew in a particular
direction.  This allowed it to write increasing strings off the end of
its static memory space and use the signal catching code you described
to notice when it ran out.  It was an elegant solution in its way, but
it imbedded assumptions about the machine architecture in the code.

--bob--



More information about the Comp.lang.c mailing list