32 bit integer size on 64 bit processor and OS

Although not strictly a dbx question, I think the audience here is the correct one to bounce this off of:
I'm curious: Why are 64 bit processes compiled with the -xarch=v9 switch having a 32 bit integer size, versus having 64 bit integer size?
Although not cast in stone, and implementation dependent, an "int was originally intended to be the "natural" word size of the processor - to use the processor's "natural" word size to improve efficiency (avoid masking, etc).".
I know you 'force' more 64 bit use (see some of Sun's doc on this below).
===============
The 64-bit Solaris operating environment is a complete 32-bit and 64-bit application and development environment supported by a 64-bit operating system. The 64-bit Solaris operating environment overcomes the limitations of the 32-bit system by supporting a 64-bit virtual address space as well as removing other existing 32-bit system limitations.
For C, C++, and Fortran software developers, this means the following when compiling with -xarch=v9,v9a, or v9b in a Solaris 7 or Solaris 8 environment:
Full 64-bit integer arithmetic for 64-bit applications. Though 64-bit arithmetic has been available in all Solaris 2 releases, the 64-bit implementation now uses full 64-bit machine registers for integer operations and parameter passing.
A 64-bit virtual address space allows programs to access very large blocks of memory.
For C and C++, the data model is "LP64" for 64-bit applications: long and pointer data types are 64-bits and the programmer needs to be aware that this change may be the cause of many 32-bit to 64-bit conversion issues. The details are in the Solaris 64-bit Developer's Guide, available on AnswerBook2. Also, the lint -errchk=longptr64 option can be used to check a C program's portability to an LP64 environment. Lint will check for assignments of pointer expressions and long integer expressions to plain (32-bit) integers, even for explicit casts.
The Fortran programmer needs to be aware that POINTER variables in a 64-bit environment are INTEGER*8. Also, certain library routines and intrinsics will require INTEGER*8 arguments and/or return INTEGER*8 values when programs are compiled with -xarch=v9,v9a, or v9b that would otherwise require INTEGER*4.
Be aware however that even though a program is compiled to run in a 64-bit environment, default data sizes for INTEGER, REAL, COMPLEX, and DOUBLE PRECISION do not change. That is, even though a program is compiled with -xarch=v9, default INTEGER and REAL are still INTEGER*4 and REAL*4, and so on. To use the full features of the 64-bit environment, some explicit typing of variables as INTEGER*8 and REAL*8 may be required. (See also the -xtypemap option.) Also, some 64-bit specific library routines (such as qsort(3F) and malloc64(3F)) may have to be used. For details, see the FORTRAN 77 or Fortran 95 READMEs (also viewable with the f77 or f95 compiler option: -xhelp=readme).
A: No program is available that specifically invokes 64-bit capabilities. In order to take advantage of the 64-bit capabilities of your system running the 64-bit version of the operating environment, you need to rebuild your applications using the -xarch=v9 option of the compiler or assembler.

I think that this was basically to keep down the headaches in porting code (and having code that will compile to both 32bit and 64bit object files). int is probably the most common type, so by keeping it at 32bits, the LP64 model has less effect on code that was originally written for 32bit platforms.
If you want to have portable code (in terms of the sizes of integral types), then you should consider using int32_t, int64_t etc from inttypes.h. Note that this header is post-ANSI C 90, so might not be portable to old C/C++ compilers.
A+
Paul

Similar Messages

  • Read an excel file and convert to a 1-D array of long, 32-bit integer?

    My vi right now reads an column of numbers as a 1-D array, but I need to input the numbers manually, and for what I'm trying to do, there could be anywhere between 100 to 500 numbers to input. I want the vi to be able to read the excel file and use that column of numbers for the rest, which the data type is long (32-bit integer).
    I have an example vi that is able to get excel values, but the output data type is double (64-bit real).
    I need to either be able to convert double(64-bit real) data to long (32-bit integer), or find another way to get the values from the excel file.

    Just to expand on what GerdW is saying.  There are many programs that hold exclusive access to a file.  So if a file is opened in Excel, the LabVIEW cannot access the file.
    What is the exact error code?  Different error codes will point to different issues.
    Make sure the csv file is exactly where you think it is and LabVIEW is pointing to the right place.  (I'm just going through stupid things I have done)
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Officejet Pro 8500 and Adobe Photoshop CS4 64 bits Image Size Problem

    I have a Windows Vista Ultimate 64 bits desktop computer. After installing the Officejet Pro 8500 multifunctional drivers all was working OK. Images were being printed nice and with the correct size using Windows print option. After installing Adobe CS4 suite, all images printed from windows or Photoshop have incorrect size (photoshop prints it smaller and windows prints it larger).
    I've installed all photoshop patches and re-install Officejet 8500 drivers, but the problem persists.
    I've also tried to make a clean installation of the whole computer from the beginning
    Does anyone know how to solve this problem? What would be the windows/HP files that were changed by Photoshop?
    Thank you.

    I'm on the phone with HP tech support about this problem. He said he's gonna charge me to fix the problem and than he put me on hold. I'm waiting to find out how much money I've saved. You put some dollars in my pocket. Thanks!!!!!!

  • 64 bits integer handling

    I can't find the way how to bind or define 64 bits integer using Oracle 8.1.7 OCI.
    Plz, tell me any effective way to handle 64 bits integer.

    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by Shoaib ([email protected]):
    If 64-bit is the normal size of integer on your platform, then passing using SQLT_INT for data type and sizeof(int) should work for your bind and define calls.<HR></BLOCKQUOTE>
    Thank you for your comments.
    The normal size of integer in my current platform is 4 bytes, 32 bits. The current 64-bit type is "long long" type. The OS I tested are Compaq Tru64 Unix V5.1 and Linux . For "long long" type, SQLT_INT and sizeof(long long) has failed.
    As work around the 64-bits integer is fetched as string into SQLT_STR defined host variables. After that, conversion from string to integer is executed using atol().
    Any other good working alternative?

  • How can I set specific bits in a 16-bit integer?

    Hello everyone,
    as the title says I need to modify or rather to set a specific bit in a string which then is sent to a motor. I need to be sure that my command is correct as I am experiencing troubles with that motor and need to identify if its source.
    First of all my strings have to be in the Little Endian order. Then the structure of the string should be the following:
    Change Velocity command ‘V’xxCR 056h + one unsigned short (16-bit) integer + 0Dh (Note: Uppercase ‘V’)
    Note: The lower 15 bits (Bit 14 through 0) contain the velocity value. The high-order bit (Bit 15) is used to indicate the microstep-to-step resolution: 0 = 10, 1 = 50 uSteps/step.
    Until now, I used Flatten To String to convert 32 bit integers into bytes of the correct order. I thought I could use the Join Numbers function, but that only works for at least 8 bit numbers and there is no "1 bit number". I searched for an option to build a a string and set the bits via a Boolean Cluster, but I did not really understand how to transfer this to my problem.
    How can I build up the correct 16-bit integer (e.g. set the velocity to "10000" with a resolution of 50 µSteps/step)
    I would like to add the "V" and the CR via Concatenate Strings to the 16-bit integer, but other possibilites are also welcome.
    I have seens the examples for bit manipulation in C-code, but I wish to do this with LabView as I am not familiar with C,matlab and so on.
    Thank you very much for your help!
    Solved!
    Go to Solution.

    You really need to learn Boolean logic and how to shift bits around.
    AND is really good for masking out bits (forcing them to 0) and OR is really good for adding bit values.  Then Logical Shift is used to get the bits in the right places before doing the AND and OR.
    NOTE: Rate is an enum with 10 being a value of 0 and 50 being 1.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines
    Attachments:
    Bit Packing.png ‏15 KB

  • INST-07408: Unable to install or configure the product on a 32-bit JVM on a 64-bit machine. Make sure to install and configure the product in supported modes.

    Hi there, i have an issue installing oracle forms and reports. its throwing this error"INST-07408: Unable to install or configure the product on a 32-bit JVM on a 64-bit machine. Make sure to install and configure the product in supported modes." on step 5. I have jdk 64bit installed, weblogic server was installed successfully but iam getting stuck somehow.
    Below are details of my pc.
    OS Name    Microsoft Windows 7 Professional
    Version    6.1.7601 Service Pack 1 Build 7601
    Other OS Description     Not Available
    OS Manufacturer    Microsoft Corporation
    System Name   ...........-HP
    System Manufacturer    Hewlett-Packard
    System Model    HP ProBook 4530s
    System Type    x64-based PC
    Processor    Intel(R) Core(TM) i5-2450M CPU @ 2.50GHz, 2501 Mhz, 2 Core(s), 4 Logical Processor(s)
    BIOS Version/Date    Hewlett-Packard 68SRR Ver. F.23, 09/03/2012
    SMBIOS Version    2.6
    Windows Directory    C:\windows
    System Directory    C:\windows\system32
    Boot Device    \Device\HarddiskVolume1
    Locale    United Kingdom
    Hardware Abstraction Layer    Version = "6.1.7601.17514"
    User Name    ...........-HP\................
    Time Zone    South Africa Standard Time
    Installed Physical Memory (RAM)    4.00 GB
    Total Physical Memory    3.94 GB
    Available Physical Memory    1.00 GB
    Total Virtual Memory    7.87 GB
    Available Virtual Memory    1.25 GB
    Page File Space    3.94 GB
    Page File    C:\pagefile.sys

    To clarify further....  It is important to note that Forms/Repors 11.1.2.x software (including WLS and JDK) must be of the same archetecture as the machine.  In other words, you cannot use the 32bit Forms/Reports 11.1.2 software on 64bit Windows.  If you are using a 64bit OS, you must install the 64bit software.  Again, this would include Forms/Reports, WLS, and JDK

  • Bought a package photographer, installed photoshop and Lightroom 5.6 64-bit, Adobe Photoshop CC 2014 was Russian, and Lightroom 5.6 64-bit is not and was not in a sample of Russian language. Tell me what to do?

    Bought a package photographer, installed photoshop and Lightroom 5.6 64-bit, Adobe Photoshop CC 2014 was Russian, and Lightroom 5.6 64-bit is not and was not in a sample of Russian language. Tell me what to do?

    Well, the quick summary that you are not going to like: This system is pretty short on RAM and processor power, your graphics driver is outdated and you are using two screens with different resolutions, which eats up all graphics acceleration plus your card has only 256 MB of VRAM in the first place, which doesn't meet the requirements. You will never be able to use 3D under those conditions.
    Mylenium

  • Market requires versionCode to be set to a positive 32-bit integer in AndroidManifest.xml

    I have built an application on flash builder Buritto  using the tutorial of " Christophe Coenraets"  building an EmployeeDirectory  and everything worked fine while debugging it in virtual environment but when I try to upload it to the andoid market im getting the  following error  : and everything worked fine while debugging it in virtual environment but when I try to upload it to the andoid market im getting the  following error  :
    Market requires versionCode to be set to a positive 32-bit integer in AndroidManifest.xml
    how can I solve this issue
    help please !!!!!!!

    Where can I find my  manifest file ? so that I can change the value ?

  • 16 bit integer vs 32 bit floating point

    What is the difference between these two settings?
    My question stems from the problem I have importing files from different networked servers. I put FCP files (NTSC DV - self contained movies) into the server with 16 bit settings, but when I pull the same file off the server and import it into my FCP, this setting is set to 32 bit floating point, forcing me to have to render the audio.
    This format difference causes stuttering during playback in the viewer, and is an inconvenience when dealing with tight deadlines (something that needs to be done in 5 minutes).
    Any thoughts would be helpful.

    It's not quite that simple.
    32 bit floating point numbers have essentially an 8 bit exponent and 24 bit mantissa.  You could imagine that the exponent isn't particularly significant in values that generally range from 0.0 to 1.0, so you have 24 bits of precision (color information) essentially.
    At 16-bit float, I'm throwing out half the color information, but I'd still have vastly more color information than 16-bit integer?
    Not really.  But it's not a trivial comparison.
    I don't know the layout of the 24 bit format you mentioned, but a 16 bit half-float value has 11 bits of precision.  Photoshop's 16 bits/color mode has 15 bits of precision.
    The way integers are manipulated vs. floating point differs during image editing, with consistent retention of precision being a plus of the floating point format when manipulating colors of any brightness.  Essentially this means very little chance of introducing posterization from extreme operations in the workflow.  If your images are substantially dark, you might actually have more precision in a half-float, and if your images are light you might have more precision in 16 bits/channel integers.
    I'd be concerned over what is meant by "lossy" compression.  Can you see the compression artifacts?
    -Noel

  • JRE v6 and v7 no longer work in my updated 64-bit W7 HPE's 32-bit IE8.

    Hello.
    Since last week, my JRE/Java v6u34 stopped working. My 32-bit IE8 kept asking me to run it in protected mode or not which was weird since it never did that before: http://i.imgur.com/Tubsl.gif ... Then, Java didn't work. So I restarted IE8 and retried again to allow it. Java applets still didn't show up (shows an empty box with X icon, JRE console doesn't even run/load). I tried my 64-bit JRE v6u35 in 64-bit IE8, no problems with Java. I tried my 32-bit Mozilla's SeaMonkey v2.12 web browser and no problems with its Java. Why is my 32-bit IE8 having problems all the sudden?
    I thought maybe my JRE installation was broken. So, I uninstalled it and reinstalled with the latest v6 (u35). Same results. I tried the very latest v7u7. Same problem. I tried uninstalling Java again, running JavaRa v1.16-23-8-12 (didn't find anything to remove), resetting IE8 options and clearing its caches), etc. I also tried disabling protected mode to see if it makes any differences when reinstalling and accessing a Java applet. Nope! I looked at my IE8's addons list and noticed jp2ssv.dll was still listed like:
    Name: Java(tm) Plug-In 2 SSV Helper
    Publisher: Control name is not available
    Type: Browser Helper Object
    Version: Not available
    File date:
    Date last accessed: Today, September 04, 2012, 1 minute ago
    Class ID: {DBC80044-A445-435B-BC74-9C25C1C588A9}
    Use count: 2030
    Block count: 9
    File: jp2ssv.dll
    Folder: C:\winstuff\JRE6\bin
    http://i.imgur.com/wvKdn.gif for a screen shot/capture.
    I searched jp2ssv.dll on my computer, and it was not found. Even my uninstalled JRE removed its JRE location/folder. How do I remove this one from 32-bit IE8's addons list? Maybe this is the problem? What's going on?
    Thank you in advance. :)

    I think you are having the same issue I've been working on. I just posted about this here:
    Newer JREs are not registering old JRE ClassIDs for all users
    You can try the following.
    * On a working user, export the key HKCU\Software\Classes\CLSID. Then import it for a failing user. Its not a real pretty solution. You should be able to narrow down exactly which subkey is needed by using Process Monitor or looking at your application HTML code where the JRE object is being called.
    * If you can change the code, look for the OBJECT or EMBED tags and look what CLSID they are referencing. Change that CLSID to "8AD9C840-044E-11D1-B3E9-00805F499D93" allow it to work with the latest Oracle/Sun JRE installed.

  • I'm using Windows 7 64 bit. I downloaded iTunes for Windows and setup an account. How do I stream a TV show to my TV. I have a Belkin router. My TV has many site Icons, e.g. Netflix, hula etc. from which I can download and watch movies in my Den.

    I'm using Windows 7 64 bit. I downloaded iTunes for Windows and setup an account. How do I stream a TV show to the TV in my bedroom? I have a Belkin router. My TV has many site Icons, e.g. Netflix, hula etc. from which I can download and watch movies in my bedroom. But the iTunes icon doesn't appear?

    I'm using Windows 7 64 bit. I downloaded iTunes for Windows and setup an account. How do I stream a TV show to the TV in my bedroom? I have a Belkin router. My TV has many site Icons, e.g. Netflix, hula etc. from which I can download and watch movies in my bedroom. But the iTunes icon doesn't appear?

  • Do Firefox's and Thunderbird's versions 32 bit work also for 64 bit systems in Linux?

    Hello
    I installed on my 64 bit laptop some Linux distros, each one in an alongside partition. Until now I used only 32 bit distros, because my machine has only 4 GB RAM and I prefer well tested softwares.
    About Firefox and Thunderbird, I don't use the distro's versions, but I download from Mozilla's site the packages tar.bz2, expand them and save them into a date partition (not a system partition), accessible by each distro. In the same partition I saved also Firefox and Thunderbird profiles, in order to use the same software, the same profiles and the same mail archive with any distro I installed.
    Now, I'd like to install also a distro that is offered only in the 64 bit version. The question is: may I use the same 32 bit version of Firefox and Thunderbird also with the 64 bit distro, sharing it (and profiles and mail archive) with the other distros (32 bit)?
    If no, may I use only for the 64 bit distro the tar.bz2 of Firefox and Thunderbird 64 bit, but keeping on sharing profiles and mail archive with 32 bit Firefox and Thunderbird (with the other distros)?
    Thanks for your help.

    You may need appropriate 32-bit packages in order to run 32-bit versions on 64-bit Linux though.
    There are 64-bit versions of Firefox for Linux at https://www.mozilla.org/firefox/all/ and for Thunderbird well they do not make as easy to get http://download.cdn.mozilla.net/pub/mozilla.org/thunderbird/releases/31.2.0/linux-x86_64/ just choose your language like say en-US.

  • HT4410 I have just installed Windows 7 64-bit full version Home Premium using Bootcamp and cannot get access to the internet. I installed on a Macbook Air Mid 2012 with Mountain Lion. Are there some drivers that are missing from the Windows 7

    Dear Apple. I have just installed Windows 7 64-bit full version Home Premium using Bootcamp and cannot get access to the internet. I installed on a Macbook Air Mid 2012 with Mountain Lion. Are there some drivers that are missing from the Windows 7 bootcamp install download from Apple

    It is a Total Misconception that the Support files are installed when you are installing Windows, even if the USB drive that holds them is inserted in the system when doing the Windows install.
    You must always Run the Setup.exe files from the support files or run the drivers individually once Windows has finished installing and booted to the desktop.
    Also you really need to run the Boot Camp Control Panel Applet and check for updates as not all the newest drivers for full function of all the hardware is included with the original support download. That download is basically a generic version to get the system working and without doing the updates not everything will work properly.

  • In which boot camp support software I can install the drivers for win 7 32 bit.my os is X10.8.5 and I install windows 7 32 bit but I can not install drivers

    in which boot camp support software I can install the drivers for win 7 32 bit.
    my os is X10.8.5 and I install windows 7 32 bit but I can not install drivers.
    also my macbook pro model is MC723.

    Read this. You need to be running Snow Leopard or later.
    http://support.apple.com/kb/ht3986

  • I am using Windows 7 64-bit. After installing Photoshop Elements 13 and trying to run it I always get the message: Photoshop does not work anymore. And it doesn't.

    I am using Windows 7 64-bit. After installing Photoshop Elements 13 and trying to run it I always get the message: Photoshop does not work anymore. And it doesn't.

    Hi Hardy Tasso,
    Are you seeing this problem since first launch of PSE13 after installation or recently?
    Please try:
    Keep Ctrl + Alt + Shift keys pressed while launching PSE13 Editor and click OK on the dialog that comes next.
    Thanks,
    Anwesha

Maybe you are looking for

  • SharePoint 2010 search error on searchadministration.aspx page in Windows Server 2012

    Hi, I am facing the below error on when I click on any of the page under the Search Serve System.ArgumentException: Could not find the sitemap node with URL '/searchadministration.aspx'. at Microsoft.Office.Server.Search.Internal.UI.SearchCentralAdmi

  • How to continue outline numbering across pages

    Using InDesign CS4 on Mac...  Sorry for the newb question, but I've got a section on the right-hand side of my document that has outline numbering across a couple pages.  I've used separate text boxes for each page.  Is it possible to continue this n

  • Mail adapter and XMLAnonymizerBean

    Hello everybody! We are using Mail Adapter  to send XML files to our clients. We are using XMLAnonymizerBean (localejbs/AF_Modules/XMLAnonymizerBean) to remove some namespaces and prefixes. We have defined: anonymizer.acceptNamespaces http://ns1.myco

  • Mail, calendar etc. cannot be activated after logging in to iCloud

    I'm running Yosemite (OS X 10.10 (14A388b)). When checking my iCloud settings, I realized that Mail, calendar, contacts, reminders, notes could not be activated. I logged out from iCloud and logged in again. Same result. When trying to activate Mail

  • Posting  transaction key PRD

    Good morning, I should do a little analysis about our G/L accounts definition for transaction key PRD. What I would like to understand is how SAP configures the automatic posting procedure or, in a better way, how SAP determines which transaction key