Accessing more than 2.0 GB of memory on Windows XP
This section describes necessary settings to get access to more than 2.0 GB
of memory on Windows XP within a V5 process.
Background
By default, Version 5 processes on Windows can allocate up to 2.0 GB of
memory for storing data and code. The 4 GB address space offered by the
operating system being split in two areas of 2 GB each, first 2 GB for user
mode, 2 other GB being reserved by the kernel. On Windows XP, it is possible to
increase the default allocation capabilities up to 3.0 GB (3 GB for user
mode, 1 GB reserved for kernel). Such capability requires additional tunings in
order to be effective :
- From an operating system standpoint
- From a Version 5 standpoint
Operating System requirements
- Windows XP Professional is required.
- A modification of boot.ini file is needed to activate this capability at
the system level. The boot.ini switch /3GB needs to be added in order to make
3 GB available for user mode applications. For example :
[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP
Professional 3GB" /fastdetect /3GB
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP
Professional" /fastdetect
Notes :
- Improper modification of the boot.ini file can cause the operating
system to be inoperable.
- For testing purposes of a given hardware configuration, it might be
preferable to create several entries in the [operating
systems] stanza, as documented in above example, as well as leave a
non zero timeout, to allow user selection at boot time between regular boot
and boot with the /3GB option; this can allow easy recovery in case the
/3GB option causes a problem described in section Additional Operating
Considerations below.
- Modification of the boot.ini file requires administrative privileges.
- boot.ini file can me modified using bootcfg.exe utility delivered with
Windows XP (see
http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q291980 for
further details on bootcfg.exe utility) or by editing the file :
- boot.ini is generally found at the root of C: drive; in a command
session (cmd.exe), make file editable :
attrib C:\boot.ini -r -s
- edit, modify and save file
- reset file attributes :
attrib C:\boot.ini +r +s
- reboot system to make the change effective
- Amount of Real memory and paging space should be sized accordingly.
- See the "Additional Operating System consideration" section in this page
to size the number of free System Page Table Entries
Version 5 required customizations
Since R14, the Version 5 main executable is already "Large Address Space
Aware", to get access to the 3GB of address space .
To disable the use of the "Large Address Space" :
- Customers having access to Microsoft Visual Studio 6 development
environment or Microsoft Visual .Net or higher environment can use editbin.exe (generally found in
C:\Program Files\Microsoft Visual Studio 8\VC\bin), the syntax is as follows :
- edibin.exe /LARGEADDRESSAWARE:NO CNEXT.exe
Note: CNEXT.exe is given here as an example, one should replace it by the
appropriate Version 5 executable.
To go back to the initial behavior after disabling the large address space
capability, one can use :
- run imagecfg.exe on CNEXT.exe
- in a command session, execute imagecfg.exe -l
CNEXT.exe
- output of above command should be similar to :
CNEXT.exe contains the following configuration
information:
Subsystem Version of 4.0
Stack Reserve Size: 0x100000
Stack Commit Size: 0x1000
CNEXT.exe updated with the following configuration information:
CNEXT.exe contains the following configuration information:
Subsystem Version of 4.0
Image can handle large (>2GB) addresses
Stack Reserve Size: 0x100000
Stack Commit Size: 0x1000
- imagecfg.exe utility can be found on the Windows Server Resource
Kit Supplement One.
- or editbin.exe /LARGEADDRESSAWARE CNEXT.exe
Additional Operating System considerations
- Some driver may not load correctly when /3GB switch is
added to boot.ini. One would need to tune /3GB configurations with /USERVA
switch in boot.ini file. See :
Driver May Not Be Loaded with the /3GB Switch "http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q319043
"
- Microsoft recommends that the number of free PTEs must be greater than
24000 . You can monitor the PTE consumption by using the System Monitor
tool or perfmon. The object to monitor is "Free System Page Table Entries."
When using the /3GB option and if the value observed is less that 24,000, you
should reduce this value in 64 MB steps until values larger than 24 kilobytes
(KB) to 26 KB are observed . You can do that by setting the /USERVA value to
3GB - (n x 64 MB) in the boot.ini . See Microsoft article "How to use the /userva
switch with the /3GB switch to tune the User-mode space to a value between 2
GB and 3 GB"
http://support.microsoft.com/?kbid=316739 .
- If you upgrade your computer to Windows XP Service Pack 2 ( SP2) and you
are using the /3GB switch, CATIA may crash when using macro . KB890048
is correcting this problem see
http://support.microsoft.com/kb/890048/. This fix
can be provided by Microsoft on demand.