Memeory 3G problems ?

J

jht

I Have a workstation with AMD64 CPU’s and 6 Giga Byte RAM ,OS Windows XP 64.
I have 2 problems with it:
1.I want my .NET application(VS.NET 2003 VC++7.0) to use more then 3 GByte of
memory,how to do? VirtualAlloc can do it?
2.I use VS .NET 2003,it can not use more than 3GByte of memory,so I want to
install VS2005 to do it ,but VS2005 can not installed ,"MSXML 6.0" install
failed.

Can anybody tell me how solve this 2 issues?
 
G

Guest

I Have a workstation with AMD64 CPU’s and 6 Giga Byte RAM ,OS Windows XP 64.
I have 2 problems with it:
1.I want my .NET application(VS.NET 2003 VC++7.0) to use more then 3 GByte of
memory,how to do? VirtualAlloc can do it?
2.I use VS .NET 2003,it can not use more than 3GByte of memory,so I want to
install VS2005 to do it ,but VS2005 can not installed ,"MSXML 6.0" install
failed.

you should probably use VirtualAllocEx. it takes a size_t size parameter,
which means you can specify > 2^32-1 bytes.

you can download msxml 6 here:
http://www.microsoft.com/downloads/...CF-3BCF-4009-BE21-27E85E1857B1&displaylang=en

but it think you can also install it when you install the VS2005
prerequisites.

--

Kind regards,
Bruno.
(e-mail address removed)
Remove only "_nos_pam"
 
W

Willy Denoyette [MVP]

|I Have a workstation with AMD64 CPU's and 6 Giga Byte RAM ,OS Windows XP
64.
| I have 2 problems with it:
| 1.I want my .NET application(VS.NET 2003 VC++7.0) to use more then 3 GByte
of
| memory,how to do? VirtualAlloc can do it?

You need a 64 bit compiler to generate 64 bit code. 32 bit compilers
(VS2002, VS2003) are not capable to use > 3GB RAM. One option is to use the
64bit C++ compiler and linker included with latest platform SDK.

| 2.I use VS .NET 2003,it can not use more than 3GByte of memory,so I want
to
| install VS2005 to do it ,but VS2005 can not installed ,"MSXML 6.0" install
| failed.
|


1. Install the V2.0 Framework
2. Install VS2005 RTM professional (not a beta!) and you need to install the
optional 64 bit C++ compiler.

Willy.
 
J

jht via DotNetMonster.com

what is the 64bit C++ compiler and latest platform SDK.
what is VS2005 RTM professional

jht
 
M

Mike via DotNetMonster.com

The VS2005 RTM professional is the release of Visual Studio .NET Professional

RTM = Release to manufacturing
 
J

jht via DotNetMonster.com

hi willy
I have installed vs2005,but it can't use >3G memory ,,i have to install
latest Platform SDK ? and if i installed latest Platform SDK ,how to do
next ,still use VirtualAlloc () fuction?

thank you very much!

jht
 
W

Willy Denoyette [MVP]

| hi willy
| I have installed vs2005,but it can't use >3G memory

What exactly are you trying and what problems do you have?
I'm using vs2005 on X64 and I can allocate > 3GB of memory, so it should
work for you too, as long as you target X64 (see your projects setting).

Willy.
 
J

jht via DotNetMonster.com

i have a stucture like this:
typedef struct d_type{
int f1;
int f2;
....
long memo;
} stdu;

long s=sizeof(stdu);
s=200bytes

now I have 20000000 data(type stdu) ,i want to allocate memory like this:

stdu *p;
p=(stdu *)VirtualAlloc(0,20000000*sizeof(stdu),MEM_COMMIT,PAGE_READWRITE);


it can not allocate >3G memory on winxp x64 with vs2005;

how to do ?

thanks

jht
 
C

Carl Daniel [VC++ MVP]

jht said:
it can not allocate >3G memory on winxp x64 with vs2005;

how to do ?

You've never replied to Willy's point - make sure your Project Type (not
just the computer you're running on) is x64. You're probably building a 32
bit executable, which still won't be able to allocate more than 3GB even if
you run it on a 64 bit machine.

-cd
 
J

jht via DotNetMonster.com

what is the Project Type x64,i created it with MFC in vs2005,is it X64
Project ?
 
J

jht via DotNetMonster.com

is it possible to allocate >3G RAM with MFC? with vs2005 on winxp x64 os?if
it is possible ,how to do?
thanks
jht
 
W

Willy Denoyette [MVP]

Make sure you did select the "X64 compilers and tools" during VS2005 set-up
(on a 32 or 64 bit system doesn't matter).
Then, and only then, will you be able to create 64 bit C++ projects.

Willy.


|i have a stucture like this:
| typedef struct d_type{
| int f1;
| int f2;
| ....
| long memo;
| } stdu;
|
| long s=sizeof(stdu);
| s=200bytes
|
| now I have 20000000 data(type stdu) ,i want to allocate memory like this:
|
| stdu *p;
| p=(stdu *)VirtualAlloc(0,20000000*sizeof(stdu),MEM_COMMIT,PAGE_READWRITE);
|
|
| it can not allocate >3G memory on winxp x64 with vs2005;
|
| how to do ?
|
| thanks
|
| jht
|
|
|
|
| Willy Denoyette [MVP] wrote:
| >| hi willy
| >| I have installed vs2005,but it can't use >3G memory
| >
| >What exactly are you trying and what problems do you have?
| >I'm using vs2005 on X64 and I can allocate > 3GB of memory, so it should
| >work for you too, as long as you target X64 (see your projects setting).
| >
| >Willy.
|
| --
| Message posted via DotNetMonster.com
| http://www.dotnetmonster.com/Uwe/Forums.aspx/dotnet-vc/200603/1
 
J

jht via DotNetMonster.com

what is the "X64 compilers and tools"? i have installed Microsoft Platform
SDK for Windows Server 2003 SP1,is it possible? would you mind give me some
link to do it?
Make sure you did select the "X64 compilers and tools" during VS2005 set-up
(on a 32 or 64 bit system doesn't matter).
Then, and only then, will you be able to create 64 bit C++ projects.

Willy.

|i have a stucture like this:
| typedef struct d_type{
[quoted text clipped - 28 lines]
| >
| >Willy.
 
J

jht via DotNetMonster.com

hi Willy,
I have a workstation with AMD64 CPU's and 6 Giga Byte RAM ,OS Windows XP 64 ,
installed Microsoft Platform SDK for Windows Server 2003 SP1.

My problem is:
1.I want to use MFC in vs2005 to develope my application,is it possible to
use >3G RAM?how to use >3G RAM with VirtualAlloc(),can u help me ,or give me
some detail link(step by step).
2.there is no option in the vs2005 for AMD64 Platform in "configation
manager" ,why?
3.would you mind to give me some link to allocate memory in vs2005?

thank u very much!
-------
jht
Make sure you did select the "X64 compilers and tools" during VS2005 set-up
(on a 32 or 64 bit system doesn't matter).
Then, and only then, will you be able to create 64 bit C++ projects.

Willy.

|i have a stucture like this:
| typedef struct d_type{
[quoted text clipped - 28 lines]
| >
| >Willy.
 
B

Bo Persson

jht via DotNetMonster.com said:
hi Willy,
I have a workstation with AMD64 CPU's and 6 Giga Byte RAM ,OS
Windows XP 64 ,
installed Microsoft Platform SDK for Windows Server 2003 SP1.

My problem is:
1.I want to use MFC in vs2005 to develope my application,is it
possible to
use >3G RAM?how to use >3G RAM with VirtualAlloc(),can u help me ,or
give me
some detail link(step by step).
2.there is no option in the vs2005 for AMD64 Platform in
"configation
manager" ,why?

It is called x64 (but AMD64 in early Betas). It is available only if
you have the Professional Edition, or better, and specifically choose
to install it. Default is 32 bit tools only.

3.would you mind to give me some link to allocate memory in vs2005?

If you run in 64 bit mode, you have *lots* of space available.

If you run a 32 bit application under 64 bit Windows, and the app is
linked with /LARGEADDRESSAWARE, it can access up to (almost) 4GB.


Bo Persson
 
J

jht via DotNetMonster.com

"specifically choose to install it. Default is 32 bit tools only." what is
meaning ? how to do to choose 64 tools?


Bo said:
hi Willy,
I have a workstation with AMD64 CPU's and 6 Giga Byte RAM ,OS
[quoted text clipped - 10 lines]
"configation
manager" ,why?

It is called x64 (but AMD64 in early Betas). It is available only if
you have the Professional Edition, or better, and specifically choose
to install it. Default is 32 bit tools only.
3.would you mind to give me some link to allocate memory in vs2005?

If you run in 64 bit mode, you have *lots* of space available.

If you run a 32 bit application under 64 bit Windows, and the app is
linked with /LARGEADDRESSAWARE, it can access up to (almost) 4GB.

Bo Persson
 
J

jht via DotNetMonster.com

hi Bo Persson
If you run a 32 bit application under 64 bit Windows, and the app is
linked with /LARGEADDRESSAWARE, it can access up to (almost) 4GB.
but I only use 2GB,why?can u tell me some detail,how to do ?

thank u very much!

-----
jht




Bo said:
hi Willy,
I have a workstation with AMD64 CPU's and 6 Giga Byte RAM ,OS
[quoted text clipped - 10 lines]
"configation
manager" ,why?

It is called x64 (but AMD64 in early Betas). It is available only if
you have the Professional Edition, or better, and specifically choose
to install it. Default is 32 bit tools only.
3.would you mind to give me some link to allocate memory in vs2005?

If you run in 64 bit mode, you have *lots* of space available.

If you run a 32 bit application under 64 bit Windows, and the app is
linked with /LARGEADDRESSAWARE, it can access up to (almost) 4GB.

Bo Persson
 
J

jht via DotNetMonster.com

Can anyone help me?

thanks

jht
hi Bo Persson
If you run a 32 bit application under 64 bit Windows, and the app is
linked with /LARGEADDRESSAWARE, it can access up to (almost) 4GB.
but I only use 2GB,why?can u tell me some detail,how to do ?

thank u very much!

-----
jht
[quoted text clipped - 14 lines]
Bo Persson
 
W

Willy Denoyette [MVP]

Jeez man, you said from the very beginning that you owned VS2005, install it
and select the 64 tools option.

Willy.

| what is the "X64 compilers and tools"? i have installed Microsoft Platform
| SDK for Windows Server 2003 SP1,is it possible? would you mind give me
some
| link to do it?
|
| Willy Denoyette [MVP] wrote:
| >Make sure you did select the "X64 compilers and tools" during VS2005
set-up
| >(on a 32 or 64 bit system doesn't matter).
| >Then, and only then, will you be able to create 64 bit C++ projects.
| >
| >Willy.
| >
| >|i have a stucture like this:
| >| typedef struct d_type{
| >[quoted text clipped - 28 lines]
| >| >
| >| >Willy.
|
| --
| Message posted via http://www.dotnetmonster.com
 

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