473,387 Members | 1,903 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

memory options

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?
Nov 17 '05 #1
6 1062
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/
Nov 17 '05 #2
ve


"Jochen Kalmbach [MVP]" wrote:
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!
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/

Nov 17 '05 #3
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/
Nov 17 '05 #4
ve wrote:
"Jochen Kalmbach [MVP]" wrote:
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
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/

Nov 17 '05 #5
ve wrote:
"Jochen Kalmbach [MVP]" wrote:
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
Nov 17 '05 #6

"ve" <ve@discussions.microsoft.com> wrote in message
news:39**********************************@microsof t.com...
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.

Nov 17 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Srijit Kumar Bhadra | last post by:
Hello, Here is some sample code with pywin32 build 203 and ctypes 0.9.6. Best regards, /Srijit File: SharedMemCreate_Mutex_win32all.py # This application should be used with...
21
by: Rabbit63 | last post by:
Hi: I want to show a set of records in the database table on the clicnt browser. I have two ways to do this (writen in JScript): 1.The first way is: <% var sql = "select firstname from...
6
by: John | last post by:
Following is a simple class: class myclass{ public: int AA; char BB; } The size of an object of myclass is 4*20000+10000. That is to say, an object of myclass occupies the memory of...
3
by: mensanator | last post by:
Since the following discussion took place (unresolved), ...
9
by: Roman Mashak | last post by:
Hello, All! In this piece of code I get 'segmentation fault' periodically: .... struct dhcp_hdr { /* ... various fields here*/ unsigned char options; } ....
4
by: Don Nell | last post by:
Hello Why is there a memory leak when this code is executed. for(;;) { ManagementScope scope = new ManagementScope(); scope.Options.Username="username"; scope.Options.Password="password";...
4
by: Sean Shanny | last post by:
To all, Running into an out of memory error on our data warehouse server. This occurs only with our data from the 'September' section of a large fact table. The exact same query running over...
18
by: MajorSetback | last post by:
I am using the Redhat version of Linux and GNU C++. It is not clear to me whether this is a Linux issue or a C++ issue. I do not have this problem running the same program on Windows but...
2
by: gaurav kashyap | last post by:
Dear all, I have a server program that listens to a particular port and a number of client programs that connect to the server. Now i want to put some data in form of python list in main...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.