malloc impossible?
Doug Gwyn
gwyn at smoke.BRL.MIL
Fri Jan 13 16:00:55 AEST 1989
In article <15445 at mimsy.UUCP> chris at mimsy.UUCP (Chris Torek) writes:
>And the code generated would be `allocate one object in each space,
>the double from F and the int from I' (that is, float and int spaces)
>rather than `allocate one object'. References to the union would
>write both spaces; pointers to unions would be represented as pairs.
Then, due to other constraints on copyability of entire objects
via punned pointers etc., you would have to "shadow" the whole
dual-data space (except where a really clever compiler could
determine that it could get away with not doing so). malloc()
would still be implementable.
Fortunately I don't know of any architectures quite like that.
Tagged architectures come close, but methods of faking them out
have been developed.
More information about the Comp.lang.c
mailing list