64-bit compile and >2gig memory access

J

Joe

One of the biggest differences between 32-bit & 64-bit is that 64-bit can
access much greater memory than the 32-bit. I was reading in the MSDN that
..NET application still get the same 2gig limit.
"As with 32-bit Windows operating systems, there is a 2GB limit on the size
of an object you can create while running a 64-bit managed application on a
64-bit Windows operating system."

If this is true, is there any way to increase it?

-Joe
 
T

Tom Spink

Joe said:
One of the biggest differences between 32-bit & 64-bit is that 64-bit can
access much greater memory than the 32-bit. I was reading in the MSDN that
.NET application still get the same 2gig limit.
"As with 32-bit Windows operating systems, there is a 2GB limit on the
size of an object you can create while running a 64-bit managed
application on a 64-bit Windows operating system."

If this is true, is there any way to increase it?

-Joe

Joe,

Just to clarify, if your quote is exact, it reads to me as: The 2GB limit is
a limit on the /size/ of a managed object, not a limit on the /amount/ of
memory you can access, e.g. having 2 2GB objects is perfectly valid.

Is this what you meant?
 
T

Thomas T. Veldhouse

Joe said:
One of the biggest differences between 32-bit & 64-bit is that 64-bit can
access much greater memory than the 32-bit. I was reading in the MSDN that
.NET application still get the same 2gig limit.
"As with 32-bit Windows operating systems, there is a 2GB limit on the size
of an object you can create while running a 64-bit managed application on a
64-bit Windows operating system."

If this is true, is there any way to increase it?

Why would you want an object to be 2GB in size anyway? That is a lot of
memory for a single object? Don't you think that it is indicitive of a poor
design to have a 2GB object? In particular, the most likely object to exceed
2GB would be a string, so it should be clear a different approach is necessary
in that case.

Having said that, I do not know the rational behind the 2GB limitation,
although it is coincidentally equal to Int32.MaxValue.
 
W

Willy Denoyette [MVP]

| One of the biggest differences between 32-bit & 64-bit is that 64-bit can
| access much greater memory than the 32-bit. I was reading in the MSDN that
| .NET application still get the same 2gig limit.
| "As with 32-bit Windows operating systems, there is a 2GB limit on the
size
| of an object you can create while running a 64-bit managed application on
a
| 64-bit Windows operating system."
|
| If this is true, is there any way to increase it?
|
| -Joe
|
|

That's right, the object size limit of ~2GB is only imposed by the CLR ,
however, no such restriction exists at the language level (CIL), so it's
possible that sometime in future this restriction will be removed or set to
another (higher) value.
The real difference between 32 bit and 64 bit is the addressable process
space (user space), A 32 bit .NET application can only address up to 2GB (or
3GB using 4GT tuning) while a 64bit .NET application can address several TB
(HW and OS restricted).
That means that while a 64 bit .NET application can create multiple <2GB
objects (constrained by available RAM) on 64 bit, a 32 bit application can't
even create a single object of that size (due to fragmentation). Be aware
that fragmentation will show it's uggly head on 64bit systems too.

Willy.
 
J

Joe

That answers my question. I wasn't too clear as to what they meant by
"object". I didn't know if they were referring to an object such as a class
or an object such as the application.
Since the application can support the full limit of the 64-bit architecture,
than compiling a 64-bit version will have huge advantages for us.
 
C

Chris Mullins

While a particular object may be limited to 2GB, your .NET application can
consume signifigantly more than 2GB in x64 land.

The SoapBox Server (a product I work on) has been up around the 64GB mark on
a few occasions during scalability testing.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top