Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Managed C++ / October 2005

Tip: Looking for answers? Try searching our database.

memory options

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
ve - 28 Oct 2005 17:29 GMT
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?
Jochen Kalmbach [MVP] - 28 Oct 2005 17:48 GMT
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.

Signature

Greetings
  Jochen

   My blog about Win32 and .NET
   http://blog.kalmbachnet.de/

ve - 28 Oct 2005 18:00 GMT
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!
>
[quoted text clipped - 7 lines]
> 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.
Jochen Kalmbach [MVP] - 28 Oct 2005 19:35 GMT
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...

Signature

Greetings
  Jochen

   My blog about Win32 and .NET
   http://blog.kalmbachnet.de/

Arnaud Debaene - 29 Oct 2005 09:06 GMT
> 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

> vinod
>
[quoted text clipped - 18 lines]
>>     My blog about Win32 and .NET
>>     http://blog.kalmbachnet.de/ 
Arnaud Debaene - 29 Oct 2005 09:09 GMT
> 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
Willy Denoyette [MVP] - 31 Oct 2005 21:09 GMT
> hi i am developing visual studio c++ application. basically i would like
> to
[quoted text clipped - 3 lines]
>
> 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.

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.