Questions tagged [32bit-64bit]

Issues related to the use of a 64-bit vs a 32-bit architecture including portability issues.

2621 questions
111
votes
7 answers

How to determine programmatically whether a particular process is 32-bit or 64-bit

How can my C# application check whether a particular application/process (note: not the current process) is running in 32-bit or 64-bit mode? For example, I might want to query a particular process by name, i.e, 'abc.exe', or based on the process…
satya
  • 2,537
  • 9
  • 33
  • 43
96
votes
8 answers

Why is long slower than int in x64 Java?

I'm running Windows 8.1 x64 with Java 7 update 45 x64 (no 32 bit Java installed) on a Surface Pro 2 tablet. The code below takes 1688ms when the type of i is a long and 109ms when i is an int. Why is long (a 64 bit type) an order of magnitude slower…
Techrocket9
  • 2,026
  • 3
  • 22
  • 33
90
votes
5 answers

In LINUX determine if a .a library/archive 32-bit or 64-bit?

We distribute in Linux a static lib in both 64-bit and 32-bit versions. When troubleshooting a customer, I would like my diagnostic shell script to quickly eliminate the issue by checking the .a archive file to detetmine whether it is 32 or 64 bit.…
cvsdave
  • 1,576
  • 2
  • 12
  • 18
82
votes
4 answers

Is it possible to install both 32bit and 64bit Java on Windows 7?

Is it possible to install both 32bit and 64bit Java on Windows 7? I have some applications that I can run under 64bit, but there are some that only run under 32bit.
moleculezz
  • 7,513
  • 4
  • 25
  • 25
81
votes
3 answers

Why is Windows 32-bit called Windows x86 and not Windows x32?

The Windows operating system can be either 32 bit or 64 bit. The 64 bit version is called Windows x64 but the 32 bit version is called Windows x86. Why isn't it called Windows x32? What is the reason?
Bacteria
  • 8,406
  • 10
  • 50
  • 67
80
votes
2 answers

C# compiling for 32/64 bit, or for 'Any CPU'?

Possible Duplicate: What does the Visual Studio "Any CPU" target mean? I've noticed that when compiling C# code in Visual Studio, there are typically options for compiling for 32/64 bit systems, and there's also one for compiling for Any…
helloworld922
  • 10,801
  • 5
  • 48
  • 85
80
votes
4 answers

Huge performance difference (26x faster) when compiling for 32 and 64 bits

I was trying to measure the difference of using a for and a foreach when accessing lists of value types and reference types. I used the following class to do the profiling. public static class Benchmarker { public static void Profile(string…
Trauer
  • 1,981
  • 2
  • 18
  • 40
77
votes
10 answers

Using a 32bit or 64bit dll in C# DllImport

Here is the situation, I'm using a C based dll in my dot.net application. There are 2 dlls, one is 32bit called MyDll32.dll and the other is a 64bit version called MyDll64.dll. There is a static variable holding the DLL file name: string…
Gilad
  • 2,876
  • 5
  • 29
  • 40
71
votes
7 answers

how much memory can be accessed by a 32 bit machine?

What is meant by 32bit or 64 bit machine? It’s the processor architecture…a 32 bit machine can read and write 32bit data at a time same way with 64 bit machine…. whats the maximum memory that a 32 bit machine can access? It is 2^32=4Gb (4Gigabit =…
haris
  • 2,003
  • 4
  • 25
  • 24
69
votes
4 answers

Have a static lib, is there a simple way to know it is for 32 bit or 64 bit?

Is there any tool that can directly test if a library is made for 32 or 64 bit?
user705414
  • 20,472
  • 39
  • 112
  • 155
67
votes
7 answers

What does it mean for a program to be 32 or 64 bit?

This question: How many bits does a WORD contain in 32/64 bit OS respectively?, mentions that word size refers to the bit size of a processor register - which i take to mean the number of bits that a computer processor operates on / i.e. the…
Zach Smith
  • 8,458
  • 13
  • 59
  • 133
66
votes
9 answers

Fast computing of log2 for 64-bit integers

A great programming resource, Bit Twiddling Hacks, proposes (here) the following method to compute log2 of a 32-bit integer: #define LT(n) n, n, n, n, n, n, n, n, n, n, n, n, n, n, n, n static const char LogTable256[256] = { -1, 0, 1, 1, 2, 2,…
Desmond Hume
  • 8,037
  • 14
  • 65
  • 112
64
votes
6 answers

The proper way of forcing a 32-bit compile using CMake

Sorry that there are many similar questions, but I do find that Googling for CMake queries always yields similar-but-not-the-same scenarios, conflicting CMake commands and so on! I need to force my project to build 32-bit binaries because I have to…
devrobf
  • 6,973
  • 2
  • 32
  • 46
62
votes
9 answers

How should I prepare my 32-bit Delphi programs for an eventual 64-bit compiler?

Possible Duplicate: How to also prepare for 64-bits when migrating to Delphi 2010 and Unicode Since I believe that 64bit Delphi compiler will appear soon, I am curious if anybody knows what kind of programs that are now 32bit will compile and…
Petra
  • 803
  • 1
  • 11
  • 12
60
votes
6 answers

Is it advisable to switch from Cygwin 32bit to Cygwin 64bit?

I've been using Cygwin (for a long time). Specifically, I use it (including gcc/g++) on Win7 for development work. I've just recently noticed there now exists a 64-bit version. I don't have a specific need which requires that I make the transition…
einpoklum
  • 118,144
  • 57
  • 340
  • 684