From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,61006929d3e14455 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!newsprint.newsread.com!newsread.com!news-xfer.newsread.com!tdsnet-transit!newspeer.tds.net!news-feed01.roc.ny.frontiernet.net!nntp.frontiernet.net!nntp-out.svc.us.xo.net!nntp1-feeder.CHI.svc.us.xo.net!newsfeed.icl.net!news-FFM2.ecrc.net!newsfeed00.sul.t-online.de!newsmm00.sul.t-online.de!t-online.de!news.t-online.com!not-for-mail From: Martin Krischik Newsgroups: comp.lang.ada Subject: Re: Ada Pointer Size Problem Date: Sun, 24 Oct 2004 18:05:03 +0200 Organization: AdaCL Message-ID: <9160366.z3WOE3zV7N@linux1.krischik.com> References: <35f054ea.0410101150.25bec2f5@posting.google.com> <6Joad.8869$UP1.8086@newsread1.news.pas.earthlink.net> <3606460.DgU2jkzDGy@linux1.krischik.com> <64622873.zC2vBuIgSo@linux1.krischik.com> <4178d562$0$12438$ba620e4c@news.skynet.be> Reply-To: krischik@users.sourceforge.net Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Trace: news.t-online.com 1098634018 03 12489 pfoTXb+1aTohiku 041024 16:06:58 X-Complaints-To: usenet-abuse@t-online.de X-ID: SIIofTZLoe6VNALkLCoIfkFFQVD6TRwYdoNufwTnKz26YQeRJJ+06Y User-Agent: KNode/0.8.0 Xref: g2news1.google.com comp.lang.ada:5673 Date: 2004-10-24T18:05:03+02:00 List-Id: 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