"Sharon" <Sh*****@newsgroups.nospam> wrote in message
news:21**********************************@microsof t.com...
Thanks for the info Karl.
I have some question.
I extended the memory to 4GB and to apply all the setting as you described
(to the Boot.ini and to my application etc. ).
But the Windows XP Pro OS report only on 3.25 BG instead of the 4GB (the
BIOS does see the 4GB), and I think that this is why my app fail to get
more
then 1.2 GB of memory.
Can you tell me in your case what is the amount of memory the Windows OS
reports on and what version of windows OS are you using?
--------
Thanks
Sharon
As I told you before, Windows XP can NEVER see the whole 4GB of RAM, the
reason for this is that the BIOS maps the hardware devices memory into the
upper range of the 4GB addressable range.
Start "Computer management" , select the Device Manager and watch your
device resources used like Mother boards and Video adapters, you will see
the memory ranges are mapped into the 4GB address range.
For instance if you have a graphics card with 128MB memory, it will probably
be mapped at D8000000-DFFFFFFF, if you have video adapter with 256 RAM, it
will probably be mapped at D0000000-DFFFFFFF.
Other devices like PCI bus and System boards have similar memory mappings,
that means that a part of the 4GB memory space is not usable (not seen) by
the software on a 32 bit OS, in your case its the range above 3.25 GB
(D0000000-FFFFFFFF).
2. The reason that you can't use more than 1.2 GB of virtual memory has
nothing to do with (1). The reason is virtual memory space fragmentation.
Even with /3GB enabled, your VM is fragmented such that, while there might
be 2GB or more free memory , it's not guaranteed that this will be in a
single block.
In general, for a small .NET program, the largest free CONTIGIOUS memory
block (at program start), is something like ~1.4GB, the second largest being
~275 MB. For a /3GB enabled process, the above figures are the same except
that you have an extra free block of ~1GB (above 2GB). As I told you before,
on a 32 bit OS you should never assume to have such large blocks of free
memory, that is, you should never create array's of that size, it will fail.
Willy.