- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Re: 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
Discussions
Discussions
Forums
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
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-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
Re: A simple C++ program crashing on HP machine.
- « Previous
-
- 1
- 2
- Next »