- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- A simple C++ program crashing on HP machine.
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2005 09:51 PM
08-21-2005 09:51 PM
int main()
{
char* abc = new char[750000000];
return 0;
}
When I comile it with aCC (no options used) and try to run I get the error:
~/a.out
IOT trap (core dumped)
This is the result of uname -a
HP-UX cs16 B.11.00 U 9000/785 2013098884 unlimited-user license
Running top shows this:
Load averages: 0.13, 0.13, 0.13
381 processes: 351 sleeping, 22 running, 8 stopped
Cpu states:
CPU LOAD USER NICE SYS IDLE BLOCK SWAIT INTR SSYS
0 0.19 0.0% 0.0% 0.0% 100.0% 0.0% 0.0% 0.0% 0.0%
1 0.08 0.0% 0.0% 0.8% 99.2% 0.0% 0.0% 0.0% 0.0%
--- ---- ----- ----- ----- ----- ----- ----- ----- -----
avg 0.13 0.0% 0.0% 0.4% 99.6% 0.0% 0.0% 0.0% 0.0%
Memory: 1246620K (822040K) real, 1036104K (810408K) virtual, 4590660K free Page
# 1/35
On another HP machine, I am facing the same problem but at a higer memory allocation. Is there something which can be done to fix this?
Solved! Go to Solution.
- Tags:
- SIGABRT
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2005 09:57 PM
08-21-2005 09:57 PM
Re: A simple C++ program crashing on HP machine.
/opt/aCC/bin/aCC --version
aCC: HP ANSI C++ B3910B A.03.31
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2005 12:06 AM
08-22-2005 12:06 AM
Re: A simple C++ program crashing on HP machine.
aCC: HP ANSI C++ B3910B A.03.52
Also if I use malloc instead of new it runs with older compiler too. But my problem is that I cannot use malloc as I am creating class object. Also I cannot use the latest compilers because that is a decision to be made by division and I cannot deviate. Any other alternative?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2005 02:20 AM
08-22-2005 02:20 AM
Re: A simple C++ program crashing on HP machine.
- Tags:
- maxdsiz
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2005 04:21 AM
08-22-2005 04:21 AM
Re: A simple C++ program crashing on HP machine.
Regards,
Don.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2005 04:30 AM
08-22-2005 04:30 AM
Re: A simple C++ program crashing on HP machine.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2005 04:36 AM
08-22-2005 04:36 AM
Re: A simple C++ program crashing on HP machine.
I also tried installing the latest runtime executable but it's not working. It works only when I use the latest compiler or replace new with malloc.
Regards,
Don.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2005 05:05 AM
08-22-2005 05:05 AM
Re: A simple C++ program crashing on HP machine.
with the -S -g options on the older compiler and then use a newer version of the compiler with the same options. You then could examine the .s (assembly source) and find the differences and maybe add a step to your makefile to patch the assembly source and then invoke the assembler. It's dumb but it just might allow you to outbushwhack the problem w/o upgrading the compiler.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2005 07:07 PM
08-22-2005 07:07 PM
Re: A simple C++ program crashing on HP machine.
- Tags:
- -N
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2005 07:39 PM
08-22-2005 07:39 PM
Re: A simple C++ program crashing on HP machine.
Regards,
Don.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2005 07:41 PM
08-22-2005 07:41 PM
Re: A simple C++ program crashing on HP machine.
Please see the program below which works:
#include
#include
#include
using namespace std;
class B
{
int abc;
public:
virtual void seti( int aaa) {abc = aaa;}
};
class A : public B
{
int i;
public:
void seti(int a) { i=a; }
int geti() { return i; }
};
int main()
{
long i = 0;
for (i=0; i<=80000000; i++)
{
//A* ptr = new A();
void* space = malloc(sizeof(A));
A* ptr = new(space) A();
}
return 0;
}
The above program also worked fine without any option.
Regards,
Don.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2005 09:31 PM
08-22-2005 09:31 PM
SolutionMalloced space goes into 2nd quadrant, so by default you can allocate maximum of 1G (even if maxdsiz is greater than 1G).
Process stack also goes into 2nd quadrant. Stack space is reserved with maxssiz, which means that large maxssiz will reduce amount that can be malloced. There are some other areas in 2nd quadrant and that will reduce amount that can be malloced even further.
With -N option amount of memory that can be allocated by malloc is expanded into 1st quadrant (which normally contains process text).
This can further be expanded to 3rd and 4th quadrant by chatr (+q3p and +q4p).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2005 09:37 PM
08-22-2005 09:37 PM
Re: A simple C++ program crashing on HP machine.
Can you tell the exact usage of chatr?
Regards,
Don.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2005 09:39 PM
08-22-2005 09:39 PM
Re: A simple C++ program crashing on HP machine.
Regards,
Don.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-23-2005 12:24 AM
08-23-2005 12:24 AM
Re: A simple C++ program crashing on HP machine.
Again I would like to thank everyone involved here. You people are great!!!
Regards,
Don.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-23-2005 12:46 AM
08-23-2005 12:46 AM