Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!haven!adm!smoke!gwyn From: gwyn@smoke.BRL.MIL (Doug Gwyn) Newsgroups: comp.lang.c Subject: Re: effect of free() Message-ID: <11090@smoke.BRL.MIL> Date: 17 Sep 89 00:34:25 GMT References: <246@ssp1.idca.tds.philips.nl> <225800221@uxe.cso.uiuc.edu> Reply-To: gwyn@brl.arpa (Doug Gwyn) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 18 In article <225800221@uxe.cso.uiuc.edu> mcdonald@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?