🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #1571

Re: Alignment (was: Structure Member Padding)

#1571
From: Richard Tobin
Date: Wed, 08 Aug 1990 17:33
22 lines
1644 bytes
>> Chars could, however, in theory be constrained to even MACHINE addresses,
>> although consecutive char* values in C programs would still be required
>> to index consecutive char objects (each of which would, in such a case,
>> occupy two machine storage units).

Indeed, it should be possible to deal with arbitrary machine
constraints by making C's pointers sufficiently unrelated to machine
addresses.  As an extreme, you could have C pointers just be integers,
and have tables (or arbitrarily complicated procedures) to translate
them to and from machine addresses.  This might of course be rather
slow.

There is work being done on a C compiler for the KCM, a machine which
can only address 8-byte objects, only 4 bytes of which contain normal
data (the other four contain among other things a data type tag).
I'll be interested to see what it looks like.

-- Richard
-- 
Richard Tobin,                       JANET: R.Tobin@uk.ac.ed             
AI Applications Institute,           ARPA:  R.Tobin%uk.ac.ed@nsfnet-relay.ac.uk
Edinburgh University.                UUCP:  ...!ukc!ed.ac.uk!R.Tobin
Technical Details
Message-ID: <3163@skye.ed.ac.uk>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!ukc!edcastle!aiai!richard
References: <1990Jul7.225141.12002@sq.sq.com> <13321@smoke.BRL.MIL> <25874@usc.edu> <1990Aug8.012908.28364@sq.sq.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!ukc!edcastle!aiai!richard
From: richard@aiai.ed.ac.uk (Richard Tobin)
Newsgroups: comp.std.c
Subject: Re: Alignment (was: Structure Member Padding)
Message-ID: <3163@skye.ed.ac.uk>
Date: 8 Aug 90 17:33:39 GMT
References: <1990Jul7.225141.12002@sq.sq.com> <13321@smoke.BRL.MIL> <25874@usc.edu> <1990Aug8.012908.28364@sq.sq.com>
Reply-To: richard@aiai.UUCP (Richard Tobin)
Organization: AIAI, University of Edinburgh, Scotland
Lines: 22