Contiguous address spaces

Chip Salzenberg chip at ateng.ateng.com
Tue Oct 18 01:16:14 AEST 1988


(Thanks, Peter, for doing my homework.)

According to peter at ficc.uu.net (Peter da Silva):
>[System V documentation on sbrk() and brk()]
>merely says "both commands reset the break value for the process and
>allocate the requested amount of space". Further on, it says "sbrk()
>adds incr bytes to the break value and changes the allocated space
>accordingly", which as much as says that it's contiguous.

I agree, that's what it says.  However...

I would consider the System V docs to be in error.  Ignoring Xenix/286,
Microport 286AT *is* System V; and there's no way a '286 can provide
contiguous space >64K unless the C compiler is always in "huge" model, an
unacceptable performance hit (and one which e.g. Microport doesn't take).

But since Unix is now written on and for 32-bit processors, I don't expect
AT&T to make doc changes required for the '286.

>>>(actually, what /bin/sh does can't be explained in polite company).
>>Can you say "catch SIGSEGV, call sbrk() and retry"?  I knew you could.
>Watch your language.
Excuse me, I forgot where I was.
-- 
Chip Salzenberg             <chip at ateng.com> or <uunet!ateng!chip>
A T Engineering             Me?  Speak for my company?  Surely you jest!
	   Beware of programmers carrying screwdrivers.



More information about the Comp.lang.c mailing list