Operating System - HP-UX
1754020 Members
7313 Online
108811 Solutions
New Discussion юеВ

aCC runtime: Uncaught exception of type "bad_alloc"

 
Sankaralingam
New Member

aCC runtime: Uncaught exception of type "bad_alloc"

We are getting the below error on HP-UX 11.11.

aCC runtime: Uncaught exception of type "bad_alloc"

We have increased the maxdsiz/maxdsiz_64bit values, but didn't resolve the issue. Kindly recommend any other kernel values needs to be increased.

Server Configuration

Physical Memory - 32GB
Swap Space - 64GB
maxdsiz - 1073741824
maxdsiz_64bit - 2147483648
B9007AA - B.11.11.18 HP C/aC++ Developer's Bundle installed
8 REPLIES 8
Steven E. Protter
Exalted Contributor

Re: aCC runtime: Uncaught exception of type "bad_alloc"

Shalom,

Consider that this is not a kernel problem.

Perhaps aCC needs a patch.

Perhaps the code being compiled is flawed and needs a change.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Dennis Handly
Acclaimed Contributor

Re: aCC runtime: Uncaught exception of type "bad_alloc"

What is the value of maxssiz?
Your maxdsiz and maxdsiz_64bit aren't big enough?
What version of aC++ are you using?

>SEP: Consider that this is not a kernel problem.

Right, it is a user problem.

>Perhaps aCC needs a patch.

Where do you get this strange idea? This means the application is broken and the user didn't handle out of memory errors. The sysadmin needs to make more, or the user must compile with +DD64 and port to 64 bit.
Sankaralingam
New Member

Re: aCC runtime: Uncaught exception of type "bad_alloc"

Thanks for the response

Here are the details

maxssiz value is 134217728
aC++ version is 3.80
Required patched have been installed for aCC

If maxdsiz and maxdsiz_64bit values are not enough, Please suggest recommended value to be set.

Dennis Handly
Acclaimed Contributor

Re: aCC runtime: Uncaught exception of type "bad_alloc"

>maxssiz value is 134217728

That's too bit, it takes away 134 Mb from your maxdsiz. Try 80 Mb.

>If maxdsiz and maxdsiz_64bit values are not enough

Set maxdsiz to 2 Gb and maxdsiz_64bit to 4 Gb.
You'll also have to link with -N.
Perhaps SEP was suggesting you may have a memory leak and no matter how big you made maxdsiz, it would run out of heap. How long does it take before it aborts?
Gmo
New Member

Re: aCC runtime: Uncaught exception of type "bad_alloc"

Hi Sankaralingam,

Is your problem solved?
Dennis Handly
Acclaimed Contributor

Re: aCC runtime: Uncaught exception of type "bad_alloc"

>Gmo: Is your problem solved?

Why are you asking, do you have similar problem?
If so the answers haven't changed.
If you need more details, please create your own thread so you can assign points. If there is some here, you can add a URL for this one.
Sankaralingam
New Member

Re: aCC runtime: Uncaught exception of type "bad_alloc"

Increased the MAXDSIZ (1GB)& MAXDSIZ_64 (2GB) and problem resolved.

Thanks all for your valuable suggestions.
Dennis Handly
Acclaimed Contributor

Re: aCC runtime: Uncaught exception of type "bad_alloc"

>Thanks all for your valuable suggestions.

If you are happy with the answers you were given, please read the following about how to assign points:
http://forums.itrc.hp.com/service/forums/helptips.do?#33