Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

My application is 32-bit but runs out of heap space after only 2GB. What is the problem?

application heap problem
0
Posted

My application is 32-bit but runs out of heap space after only 2GB. What is the problem?

0

On our SUN systems, you can set limits on the stack space and heap space using the limit command: limit stacksize 524288 The above example sets the maximum stack space to be 0.5 GB. You can also “unlimit” the stack space with: unlimit stacksize You can also “unlimit” the heap space: unlimit datasize Since SUN Solaris 2.8 is 64-bit, you can have a swap space file greater than 2 GB, and can therefore have a heap space of more than 2 GB. However, if you unlimit the stack space, it will set it to 2 GB, meaning that the remaining space in a 32-bit address for the heap space is 2 GB. To give more space to your heap for a 32-bit application, limit your stack. With a stack size of 1 GB, my heap space could grow to 3 GB. This allowed me to use the 32-bit compilation of Polaris without attempting to compile with the 64-bit gcc compilers.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123