- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Memory Exhausted
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
11-22-2002 11:00 PM
11-22-2002 11:00 PM
Memory Exhausted
There is this recurring problem with a small utility that i have written. Its basically a conversion utility that parses information from a propriety binary format to XML. The problem is that with small files the utlity works fine. But with a binary file of around 7 Megs, the utility does a core dump with an error:
Memory exhausted.
What could be the problem and posibble cure? I have
RAM=512 Megs
swap=1024
OS=HP-UX 11.00
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-24-2002 01:42 PM
11-24-2002 01:42 PM
Re: Memory Exhausted
You need to look at your kernel parameters, and of course your program to make sure you aren't consuming all of the available memory.
Post the kernel parameters here and we will take a look at them.
live free or die
harry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-24-2002 02:07 PM
11-24-2002 02:07 PM
Re: Memory Exhausted
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-24-2002 08:39 PM
11-24-2002 08:39 PM
Re: Memory Exhausted
Thanx for the tips, the code is in C. I am looking into mending the code, but its a bit difficult, coz to allocate dynamic memory i dont know before hand exactly how much i will need.any suggestions?
Thanx.
P.S. Sorry for the late feedback, was out of reach due to weekend.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-25-2002 03:01 AM
11-25-2002 03:01 AM
Re: Memory Exhausted
Check this:
int fun( void )
{
char arr[ 1 << 24 ]; // eat stack
return fun();
}
int main( void )
{
return fun();
}
aCC, run:
Pid 23574 received a SIGSEGV for stack growth failure.
Possible causes: insufficient memory or swap space,
or stack size exceeded maxssiz.
Segmentation fault (core dumped)
I think that exhausting heap is the problem here. Check maxdsiz, and the most important: Check very carefully if you're freeing absolutelly everything allocated by you earlier.
Good luck
Adam
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-25-2002 07:25 AM
11-25-2002 07:25 AM
Re: Memory Exhausted
Dynamic memory does not require that you know exactly how much memory you need but only how much ADDITIONAL memory you need at this moment. For example, using the sizeof() pseudofunction, you might find that you need 80 bytes for a struct, you then call malloc(), calloc(), or realloc() with the value you obtained from sizeof().