From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f678f,466dba702f09621e X-Google-Attributes: gidf678f,public X-Google-ArrivalTime: 1994-10-18 21:35:15 PST Newsgroups: comp.unix.osf.misc Path: bga.com!news.sprintlink.net!howland.reston.ans.net!europa.eng.gtefsd.com!news.mathworks.com!solaris.cc.vt.edu!tml.com!uunet!world!dsb From: dsb@world.std.com (David Boyce) Subject: Re: help, malloc 32 vs malloc 64 In-Reply-To: teak@csugrad.cs.vt.edu's message of 15 Oct 1994 09:33:34 -0400 Message-ID: Sender: dsb@world.std.com (David Boyce) Organization: The World References: <37olne$rqn@csugrad.cs.vt.edu> Date: Wed, 19 Oct 1994 03:37:07 GMT In article <37olne$rqn@csugrad.cs.vt.edu> teak@csugrad.cs.vt.edu (Teak 'Teakster' Min) writes: > Problem: I am working on a DEC Alpha using OSF/1. I need to know > if there is anyway to #define an int in C to a long. What I am > having problems is that when I malloc and I get a memory location, > the address is assigned to a pointer of type int which is 32bit but > the system gives back an address with is greater than 32bit address. > I know that OSF is a 64 bit architecture. What I need to know is > how to compile my program which will use only address in the > 32bit range OR set on option that will make int larger than 32bit. > This program (or I should say environment) is compiled using both > cc and gcc. Perhaps I'm missing something, but this sounds exactly like what the -taso (truncated address space option) flag on DEC's C compiler is designed for. Have you looked that up in the man page? -- David Boyce (dsb@id.wing.net)