Usenet comp.unix.osf.misc (1992-2004)
 help / color / mirror / Atom feed
From: herrlich@tpwaxp.tay1.dec.com (Alan Herrlich)
Subject: Re: help, malloc 32 vs malloc 64
Date: 21 Oct 1994 13:36:04 GMT	[thread overview]
Message-ID: <HERRLICH.94Oct21093604@tpwaxp.tay1.dec.com> (raw)
In-Reply-To: teak@csugrad.cs.vt.edu's message of 15 Oct 1994 09:33:34 -0400

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.

>   cc and gcc.  I was TOLD that c was a portable code, was I lied to?

The short answer is to use the -taso switch on the OSF/1 C compiler.
That will cause the C compiler to tell the linker to create a program
that will only have 32 bit addresses.

For the long answer I suggest that you ask about C portablility issues
in a C related newsgroup. There are lots of assumptions that you can
make in a C program that can make if non-portable.


--
Alan Herrlich					herrlich@microw.enet.dec.com

Opinions herein are my own and do not necessarily reflect those of Digital.
For a summary of Digital's Internet services, send mail to info@digital.com


      parent reply	other threads:[~1994-10-21 13:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1994-10-15 13:33 help, malloc 32 vs malloc 64 Teak 'Teakster' Min
1994-10-15 19:56 ` Rich Salz
1994-10-19  3:37 ` David Boyce
1994-10-21 13:36 ` Alan Herrlich [this message]
read-only archive

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