Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!cbosgd!ihnp4!cuae2!ltuxa!ttrdc!levy From: levy@ttrdc.UUCP (Daniel R. Levy) Newsgroups: net.lang.c Subject: Re: malloc() Message-ID: <890@ttrdc.UUCP> Date: Sun, 18-May-86 22:23:17 EDT Article-I.D.: ttrdc.890 Posted: Sun May 18 22:23:17 1986 Date-Received: Fri, 23-May-86 05:17:57 EDT References: <479@cit-vax.Caltech.Edu> <5462@alice.uUCp> Organization: AT&T, Computer Systems Division, Skokie, IL Lines: 24 In article <5462@alice.uUCp>, ark@alice.UucP (Andrew Koenig) writes: >> I don't think 'void *' is useless. What do you do on a machine >> where it's NOT 'always legal to cast any pointer into a "char *"'? > >You don't implement C on it. Why not? If a "char *" per se (the machine's idea of a byte address) doesn't contain sufficient information to reconstruct another type of address from it, you could always have the compiler generate code to carry around enough extra information with the C pointers to allow reconstruction of pointers to larger data types. Can anyone name such a machine which wouldn't be amenable to this? I'm not talking about machines that are hostile to unbridled pointers like the Burroughs beasts (no hardware memory protection). I'm talking about machines whose byte and word addressing schemes have no relationship whatsoever. -- ------------------------------- Disclaimer: The views contained herein are | dan levy | yvel nad | my own and are not at all those of my em- | an engihacker @ | ployer or the administrator of any computer | at&t computer systems division | upon which I may hack. | skokie, illinois | -------------------------------- Path: ..!{akgua,homxb,ihnp4,ltuxa,mvuxa, vax135}!ttrdc!levy