computer question (in Off-topic)


Admindudemus [jabberwocky] July 17 2009 11:45 AM EDT

ok, 32 bit windows has a ram memory limit smaller than 64 bit. a 64 bit operating system can run 32 bit programs.

when a 64 bit os is running a 32 bit program can it use all available ram or is it capped at the 32 bit os limit?

i would guess that it can use all available system ram as that is handled by the os and not the program but i just wanted to verify.

AdminShade July 17 2009 11:50 AM EDT

it is most often handled by the OS but in some occasions the program is capable of using more memory than the OS can.


Examples are Adobe Photoshop programs under windows 32 bits who use more than the ~3.5 GB of memory win 32 bits can use.

Flamey July 17 2009 1:52 PM EDT

I was under the impression that a 32bit program can only use the RAM as that of a 32bit OS even if it was a 64bit OS.

AdminShade July 17 2009 1:56 PM EDT

That holds true for 99% of all programs except for some exceptions.

I've seen some programs using more memory than the windows I used was able to.

Marlfox [Cult of the Valaraukar] July 17 2009 2:25 PM EDT

I'm pretty sure Photoshop and some other Adobe products are the only exceptions, but I can't be sure, of course.

Marlfox [Cult of the Valaraukar] July 17 2009 2:26 PM EDT

Perhaps some 3D programs too. (?)

Brakke Bres [Ow man] July 17 2009 4:11 PM EDT

read:

--------------------------------------------------------------------------------

You have a basic misunderstanding of RAM, memory, and virtual memory address
space.

32-bit Windows uses a flat memory address space, thus is limited to 4 GB of
memory addresses. This is divided up 2 GB for individual user programs, and
2 gb for the operating system. It doesn't matter if you have 4 GB of RAM, or
512 Mb of RAM, it's the same virtual memory address space. This means that
in order to directly address the memory used by video cards, and other such
things on your computer, the OS has to be assign those specific addresses to
that memory, and it's locked away and can't be seen - effectively making
your memory address space smaller. But each user program that runs gets its
own 2 GB of virtual memory address space, regardless of the RAM in your
machine. There are even programs that can access >2 GB of memory address
space, IF you configure Windows to allow it - using the /3GB boot switch.
This effectively limits the OS to only 1 GB of virtual memory address space
for its own operations, however, causing the operating system to effectively
starve if there's a lot of I/O or other demands on the OS itself, so it
isn't recommended for ordinary usage. Especially since only specially
written programs can take advantage of it.

Now, RAM. If you have 8 GB of RAM, running 32-bit Windows Vista, you simply
can't see any of the RAM >4GB - there's no address space to communicate with
it. So, if you have >4GB of RAM, you _need_ 64-bit Windows. (There is one
exception to this, using something called /PAE, but it's not supported on
all versions of 32-bit Windows and has a significant speed penalty, so is
generally not recommended.)

Whether a particular program that uses 1 GB of _memory_ will have all of the
program in RAM is a decision that the operating system makes. It may decide
to offload some of that to virtual memory, or may leave it all in RAM,
depending on the other requirements of the system.

In 64-bit Windows, the memory address space is 16 TB. 8TB for user programs
and 8TB for the operating system. 32-bit programs running in 64-bit Windows
run in the WOW64 subsystem. Each 32-bit program is assigned a 4 GB virtual
memory address space in the WOW64 subsystem - with no requirement for the OS
which is still running in the 8 TB of virtual memory address space it gets.
So, if your 32-bit program is written to take advantage of >2GB of memory
(using the LARGEMEMORYADDRESSAWARE compiler switch), it will automatically
see a full 4GB.

In a nutshell only the OS is limited
This thread is closed to new posts. However, you are welcome to reference it from a new thread; link this with the html <a href="/bboard/q-and-a-fetch-msg.tcl?msg_id=002pT2">computer question</a>