memory options

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

hi i am developing visual studio c++ application. basically i would like to
give memory usage options for the runtime for running my programe? i know how
to do it in jave but is dont know how to give for a c++ program?

do any one of you know how to set these options?
 
Hi ve!
hi i am developing visual studio c++ application. basically i would like to
give memory usage options for the runtime for running my programe? i know how
to do it in jave but is dont know how to give for a c++ program?

do any one of you know how to set these options?

What options do you mean?
I C/C++ you have fully control over memory, so you can do what you want.
There is no garbage-collector or some other "hidden" stuff.

--
Greetings
Jochen

My blog about Win32 and .NET
http://blog.kalmbachnet.de/
 
:
i am under impression that when you run a c/c++ program the runtime will
allocate some maximum memory for the program beyond which it cannot exceed.
Is this right?

vinod
 
Hi ve!
i am under impression that when you run a c/c++ program the runtime will
allocate some maximum memory for the program beyond which it cannot exceed.
Is this right?

Normally the memory is only allocated if you are requesting it (for
example by calling "new" or "malloc").

But in general there is a maximum memory which could be allocated. But
this is not specific to C7C++; this also true for all other languages...
If the OS resources are exhausted, then you cannot allocate more memory...

--
Greetings
Jochen

My blog about Win32 and .NET
http://blog.kalmbachnet.de/
 
ve said:
:
i am under impression that when you run a c/c++ program the runtime
will allocate some maximum memory for the program beyond which it
cannot exceed.
Is this right?

No. There are obviously a few limitations, but they are mainlyWindo
 
ve said:
:
i am under impression that when you run a c/c++ program the runtime
will allocate some maximum memory for the program beyond which it
cannot exceed.
Is this right?

No, The limitations you will get are because of Windows, not because of C++
runtime. The main limitations are :

- You've got 2GB to hold all your data : code, stacks, heaps, etc..

- A thread stack has a maximum fixed size (most often, 1 MB).

Arnaud
MVP - VC
 
ve said:
hi i am developing visual studio c++ application. basically i would like
to
give memory usage options for the runtime for running my programe? i know
how
to do it in jave but is dont know how to give for a c++ program?

do any one of you know how to set these options?

Java has a runtime (VM) that offers the possibility to specify the max.
memory usage for it's Garbage collected heap, native C++ programs do not
have such a runtime, Visual studio 2003/2005 "managed" C++ programs however
do have a similar runtime as Java, so, question is - what runtime or what
C++ language are you talking about?

Willy.
 
Back
Top