Solved

Heap, Stack & C++ Builder

Posted on 1997-07-23
3
899 Views
Last Modified: 2012-05-04
Hello, you all.  I'm working in an application for Windows95, with C++ Builder. I need to modify the size of stack and heap, because I run out of memory in runtime,
when my application tries to load big files. Could
you explain me how can I vary the size of stack & heap
using the code source or in another way? Thanks a lot...
0
Comment
Question by:mayorgas
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 4

Accepted Solution

by:
AVaulin earned 100 total points
ID: 1165706
Modify what you want with STACKSIZE and HEAPSIZE module-definition statements in your .def (module-definition) file.
0
 

Expert Comment

by:BigRog
ID: 1165707
For C++Builder it's simple.  With your project open, select the menu Options->Project, then select the tab titled Linker.  You will see the min and max stack sizes, ands that's all there is to it.  

As far as the heap size, you don't need to worry about that, you have access to all the available memory, so stack is all you need to modify.

Good luck,
BigRog
0
 

Author Comment

by:mayorgas
ID: 1165708
The answer from AVaulin seems to be right for C++, but in C++ Builder, it seems better using the way explained by BigRog.
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

What is C++ STL?: STL stands for Standard Template Library and is a part of standard C++ libraries. It contains many useful data structures (containers) and algorithms, which can spare you a lot of the time. Today we will look at the STL Vector. …
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question