comp.lang.ada
 help / color / mirror / Atom feed
From: Martin Krischik <krischik@users.sourceforge.net>
Subject: Re: Ada Pointer Size Problem
Date: Sun, 24 Oct 2004 18:05:03 +0200
Date: 2004-10-24T18:05:03+02:00	[thread overview]
Message-ID: <9160366.z3WOE3zV7N@linux1.krischik.com> (raw)
In-Reply-To: 4178d562$0$12438$ba620e4c@news.skynet.be

Adrien Plisson wrote:

> Martin Krischik wrote:
>> Jeffrey Carter wrote:
>>>Every C
>>>I've ever used allowed a pointer or address to be stored in an int.
>> 
>> Then you have used C only in a very small windows of opportunity. You
>> have missed the intersting world of the 80286 with it's host of very
>> interesting memory models.
> 
> in C and C++ on most 32 bits platforms:
> sizeof( void *) == sizeof( long ) == sizeof( int ) == 4
> that's why he is allowed to store pointers in an int. to use 64 bit wide
> integers, you have to use __int64.

Only the the computers I bought recently are 64 bit and - if you belive in
Moors law - transition to greater 2 GB of main memory for general use
should happen within the next 18 month.

BTW: You should store pointers in intptr_t or uintptr_t.

And you should not use datatypes which start with two "_" - If you need 64
bits you should use int64_t.

> so I don't think he missed the 80286 and its bunch of wonderful memory
> models...

There was a bit of sarcasm on my side here.

>> And you have not yet arrived the great new world of 64 bit computing -
>> where a pointer is twice the size of an int.
> 
> well, we have to get prepared for the future world of 128 bit computing.
> coming sooner or later to a computer near you !

Well Moors law demands an additional bit ever 18 month. So PC's will need
128 bit address space in about 24 years. Workstations, Server etc. pp. a
little sooner.

With Regards

Martin

-- 
mailto://krischik@users.sourceforge.net
http://www.ada.krischik.com




  parent reply	other threads:[~2004-10-24 16:05 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-10 19:50 Ada Pointer Size Problem skidmarks
2004-10-11  1:38 ` Stephen Leake
2004-10-12 18:44   ` skidmarks
2004-10-13  1:23     ` Jeffrey Carter
2004-10-13  8:07     ` Martin Krischik
2004-10-13 16:27     ` Jean-Pierre Rosen
2004-10-11  5:18 ` Jeffrey Carter
2004-10-21  1:16   ` Dave Thompson
2004-10-21  1:56     ` Jeffrey Carter
2004-10-21  9:54       ` Martin Krischik
2004-10-22  1:09         ` Jeffrey Carter
2004-10-22  7:48           ` Martin Krischik
2004-10-22  9:41             ` Adrien Plisson
2004-10-22 16:50               ` Warren W. Gay VE3WWG
2004-10-24 16:05               ` Martin Krischik [this message]
2004-10-23  1:35             ` Jeffrey Carter
2004-10-24 15:52               ` Martin Krischik
2004-10-22  5:41       ` Simon Wright
2004-10-22 18:05       ` Mark Lorenzen
2004-11-01  8:14       ` Dave Thompson
2004-10-11  8:45 ` Martin Krischik
     [not found]   ` <1c2f5137.0410130505.57e03c@posting.google.com>
2004-10-13 13:37     ` Dmitry A. Kazakov
2004-10-14  3:46     ` Steve
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox