effect of free()

Doug Gwyn gwyn at smoke.BRL.MIL
Sun Sep 17 10:34:25 AEST 1989


In article <225800221 at uxe.cso.uiuc.edu> mcdonald at uxe.cso.uiuc.edu writes:
>If this sort of stuff is not literally IMPOSSIBLE on a given
>machine, using a union should work. If it IS impossible -
>don't buy the machine. If it doesn't work - don't buy the compiler.

It might or might not be possible to do it via C unions,
depending both on the machine architecture and on the C implementation.

>Is not most of Unix written in C?  Doesn't this sort of stuff happen there?

UNIX grew over many years, starting from a single machine implementation
in assembly language, progressing through a single machine implementation
primarily in C, today primarily implemented in portable C.  Apart from
vestiges of its evolution that could be cleaned up and made portable,
there is little need for such bit diddling in the universal part of UNIX.
Device drivers etc. are inherently implementation-specific, and they do
sometimes rely on aspects of the C implementation that are not guaranteed
to be portable.  But so what?



More information about the Comp.lang.c mailing list