malloc impossible?

John Woods john at frog.UUCP
Wed Jan 18 13:35:00 AEST 1989


In article <9384 at smoke.BRL.MIL>, gwyn at smoke.BRL.MIL (Doug Gwyn ) writes:
I> In article <1010 at vsi.COM> friedl at vsi.COM (Stephen J. Friedl) writes:
n> >> One can imagine a machine with different spaces for each different
t> >> intrinstic data type, where malloc() has to select from one of 8
e> >> or 16 possibilities.  Of course, since malloc() gets only one argument,
r> >> it has no way to decide which address space to use.
p> >Wow. Wouldn't structs be *really* interesting on a machine like this?
r> 
e> Don't worry, unless all those spaces are "shadowed", C cannot be
t> implemented on it.

Actually, the real solution to such a problem is to write a PDP-11 simulator
in the native machine code, and use a PDP-11 compiler for the newly-produced
virtual machine.  The ANSI spec doesn't DEMAND that floating-point operations
use any available floating point hardware, does it?

If an architecture is going to be that bizarre, C is not necessarily going to
be the language of choice for it.
-- 
John Woods, Charles River Data Systems, Framingham MA, (508) 626-1101
...!decvax!frog!john, john at frog.UUCP, ...!mit-eddie!jfw, jfw at eddie.mit.edu

Go be a `traves wasswort.		- Doug Gwyn



More information about the Comp.lang.c mailing list