From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Thread: d180ab3bd8,ddd5f2f431fd91ca X-Google-Attributes: gidd180ab3bd8,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!npeer03.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!nx02.iad01.newshosting.com!newshosting.com!69.16.185.51.MISMATCH!isp-post01.iad!news.cv.net!not-for-mail Newsgroups: comp.sys.dec Subject: Re: OpenVMS Still Only 32-Bit Addresses!? References: <65fd98f9-d503-4eaa-bbb7-bc4187eb3870@m7g2000vbq.googlegroups.com> From: VAXman- @SendSpamHere.ORG Reply-To: VAXman- @SendSpamHere.ORG Date: Sun, 13 Feb 2011 14:18:09 GMT Message-ID: <00AAAEE7.653655DE@SendSpamHere.ORG> Organization: c.2011 Brian Schenkenberger. Prior employers of copyright holder and their agents must first obtain written permission to copy this posting. NNTP-Posting-Host: 67.83.127.219 X-Complaints-To: abuse@cv.net Xref: g2news1.google.com comp.sys.dec:2805 In article , Lawrence D'Oliveiro writes: >In message <65fd98f9-d503-4eaa-bbb7- >bc4187eb3870@m7g2000vbq.googlegroups.com>, tothestarsby2100 wrote: > >> On Feb 12, 5:37 pm, Lawrence D'Oliveiro > central.gen.new_zealand> wrote: >> >>> I just ran a C program on gein.vistech.net (Alpha OpenVMS 7.3.1, I >>> believe) containing the following line >>> >>> fprintf(stdout, "sizeof(void *) = %d\n", sizeof(void *)); >>> >>> and was surprised to see it print out >>> >>> sizeof(void *) = 4 >> >> The systems at vistech are 32 bits ... > >No, they do 64 bits. And OpenVMS 7.0 and later do support 64-bit addressing. > >I figured it out. You have to compile with /POINTER_SIZE=LONG. I now get > > sizeof(void *) = 8 > >as I expected. Like I said, YOU didn't make the transition. Now, do you need full 64 bits? If you're just playing about in normal process space, you've no need for it. P0/P1 addresses extend to 00000000.xxxxxxxx and S0/S1 to FFFFFFFF.xxxxxxxx. If you _require_ 64 bit addressing within portions of the code, you can use: #pragma required_pointer_size save #pragma required_pointer_size long #pragma required_pointer_size restore In some cases, going to the 64 bit pointer will save you and instruction or three due to implicit sign-extention operations but it's not really a great big savings on CPU performance unless you're doing it a gazillion times. -- VAXman- A Bored Certified VMS Kernel Mode Hacker VAXman(at)TMESIS(dot)ORG All your spirit rack abuses, come to haunt you back by day. All your Byzantine excuses, given time, given you away.