brk's zero-fill behavior on VAXen (useful undefined checks)

Guido van Rossum guido at mcvax.uucp
Fri Nov 14 07:19:40 AEST 1986


In article <7315 at utzoo.UUCP> henry at utzoo.UUCP (Henry Spencer) writes:
>Yet another similar trick:  in the Algol 68 implementation for the Cyber,
>from CDC Netherlands I think it was, the garbage collector uses the extra
				    ^Yes
>bits in the pointers as mark bits, thereby using zero extra storage!

Well, I wouldn't call using 60 bits for an 18-bit quantity (really 17,
since user address spaces were limited to 2**17) "using zero extra
storage".  But I believe they did more than just using it for mark bits:
pointers on the heap would have a special bit pattern in the top 12 bits
which would make them an illegal and impossible floating point number,
so that they could do a linear scan of the heap and find all references!
(The FP unit would help in recognizing these words because it had an
instruction for testing whether any particular value was OK to use.)
This worked because there were no 'packed' structures, ints were
supposed to be limited to 48 bits (as indeed they are on the Cyber if you
want to do multiplies or divides), and the densest packing of characters
had only 4 12-bit characters in a word.

	Guido van Rossum, CWI, Amsterdam <guido at mcvax.uucp>

In a different world, we would all be doing our systems programming in
Algol-68 instead of C.



More information about the Comp.unix.wizards mailing list