Re: Available Memory to 32-Bit Applications
Thank you for the correction on the use of the word application where I
stated process. Reading the below, you may understand while I crossed my
words. But, "converting" on the fly is the process for x86 on x64.
Regarding WOW64: (from MS)
http://msdn.microsoft.com/en-us/library/aa384249(VS.85).aspx
(in case you want to read up on WOW64)
"Many 32-bit applications will not be updated for Windows Vista x64 Edition;
however, most 32-bit software will still function because of a Microsoft
emulation layer. This emulation layer, known as Windows on Windows 64 or
WoW64, enables 32-bit programs to run as though on a 32-bit version of
Windows by translating instructions passing in and out of 32-bit
applications into 64-bit instructions. Emulated programs act as though they
are running on an x86 computer and operate within the 2 GB of virtual memory
that a 32-bit version of Windows allocates to every process. However,
despite Wow64, 32-bit programs on Windows Vista x64 Edition cannot take
advantage of the larger 64-bit address spaces or wider 64-bit registers on
64-bit processors."
The phrase "by translating instructions passing in and out of 32-bit
applications into 64-bit instructions" would be "on-the-fly."
The phrase "operate within the 2 GB of virtual memory that a 32-bit version
of Windows allocates to every process" would be the "being limited to 32-bit
rules."
In most cases, 32-bit instructions are converted "on-the-chip"... (a 32-bit
instruction is put into a 64-bit register.) Most kernel routines require
conversion to a 64-bit equivalent call. In this case, WOW64 adds overhead as
it must maintain both 32-bit and 64-bit stacks to allow communication within
the executable and externally to any kernel connections (kernel32.dll,
ntdll.dll, user32.dll, imm32.dll ,gdi32.dll, rpcrt4.dll).
"WOW64 adds significant virtual memory overhead if two or more instances of
the same 32-bit application are run concurrently. read-only memory pages are
not shared between 32-bit processes as they are on x86 NT/Win9x."
"WOW64 does not support access to more than 2gb of memory - there is no
support for 3gb usermode processes via /LARGEADDRESSAWARE:YES
All kernelmode drivers must be ported to 64-bit native code."
Beyond that, well, have a good day.
"Bobby Johnson" <rjohnson@aol.NOSPAM.com> wrote in message
news:%23Hi3gFdNJHA.1960@TK2MSFTNGP04.phx.gbl...
> I don't know where you obtained your information, but it is seriously
> flawed. 32-bit application are NOT converted "on-the fly" in Windows
> x64! The are run in a virtual 32-bit environment space under WOW64.
> You need to do some more research before you make such erroneous
> statements! And each APPLICATION gets 2GB for ALL its processes to share!
>
>
> Mark H wrote:
> > An architectural limit has been reached. Some commonly reported
> > architectural limits in Windows include:
> >
> > 1. 2 GB of shared virtual address space for the system
> > 2. 2 GB of private virtual address space per process
> > 3. 660 MB System PTE storage
> > 4. 470 MB paged pool storage
> > 5. 256 MB nonpaged pool storage
> > 6. 1 GB System cache
> > 7. 16,000 GB pagefile size
> >
> > Your current set of applications are using 18GB of virtual address
space. (8
> > application processes, 1 OS)
> > So answering you're original question, Yes. Each process has it's own
2GB of
> > virtual memory.
> >
> > But, here's the rub:
> > Your're running 32-bit applications in a 64-bit OS. For this to occur,
the
> > 32-bit application must be converted, on-the-fly, to a 64-bit
application.
> > It now uses twice as much memory to do the same thing while being
limited to
> > the 32-bit rules. The executable stays the same size (only converted as
> > used), but the data produced is retained in 64-bit. Example: Your
routine is
> > 1KB, but it calculates Pi to 1GB places. To store the number, you need
2GB
> > for this emulated x64 application. Since these are data intensive
> > applications, you may be running out of memory, not addresses. Run less
> > processes, or set the page file bigger.
> >
> > You have 16 GB of RAM, paging will occur as you are currently setup
> > significantly reducing the performance of your applications. But, more
> > importantly, the Paged Pool Entry Table is trying to handle a huge
amount of
> > information. You may be running out of Shared Virtual Memory (the OS)
which
> > is reported as Out of Memory, and not Private Virtual Memory for your
> > processes. Because you hit the limit at 1.8GB, I suspect your problem is
> > Shared Virtual Memory (the OS) running out of memory as it sets up
tables
> > for paging all the data produced.
> >
> > A kernel debugger is needed to find out which limit you are violating.
> >
> > "Bobby Johnson" <rjohnson@aol.NOSPAM.com> wrote in message
> > news:OMXFqSVNJHA.5232@TK2MSFTNGP05.phx.gbl...
> >
> >> Each 32-bit program has it own block of memory which will be shared by
> >> the processes running within that program just as if it were actually
> >> running that program on a Windows XP Pro (32-bit) system. I thought
> >> that was pointed out in the info on WOW64.
> >>
> >>
> >> Mike Sharpe wrote:
> >>
> >>> The documents were helpful but did not answer my question. I
understand
> >>> 64-Bit addresses. I understand 32-Bit addresses. What I am not
> >>> understanding is whether or not the 64-Bit Windows Virtual Memory
> >>>
> > Manager can
> >
> >>> provide unique blocks of 2GB (or 3GB with the switch) for each 32-bit
> >>> process or if they all share the same. I have an 8 core computer with
> >>>
> > 16GB
> >
> >>> of RAM running 64-Bit OS. I have 8 32-Bit processes running. My page
> >>>
> > file
> >
> >>> is setup for 10GB which should leave me with a total of approximately
> >>>
> > 26GB of
> >
> >>> Virtual Memory.
> >>>
> >>> I start up an application 8 times. Each one runs in its own process
and
> >>> assigned to its own CPU. This application is 32-Bit and let's say
each
> >>>
> > one
> >
> >>> uses about 1GB of RAM. What I am seeing is that when the Physical
> >>>
> > Memory of
> >
> >>> the box (not per process, the whole box) reaches about 1.8GB, my
> >>>
> > processes
> >
> >>> start experiencing problems and I get Out of Memory errors. If I do
> >>>
> > some
> >
> >>> quick math, 8 CPU x 1GB = 8GB of memory total. Since my system has
16GB
> >>> total, I should be consuming only about half. And each 32-Bit process
> >>>
> > is
> >
> >>> under the 2 GB limit.
> >>>
> >>> What I suspect is happening is that each process is sharing the SAME
> >>>
> > 32-Bit
> >
> >>> space instead of being granted their own space in the Virtual memory
and
> >>>
> > the
> >
> >>> 64-Bit memory manager controlling where each process recognizes its
> >>>
> > space.
> >
> >>> Even if some data is in the 64-Bit range for a single process, it
should
> >>>
> > be
> >
> >>> able to map that down to the process specific 32-Bit range.
> >>>
> >>>
> >>>
> >>>
> >
> >
> >