GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- 800MB malloc limit???
Operating System - HP-UX
1847225
Members
2463
Online
110263
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Forums
Discussions
back
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- 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
01-14-2003 12:02 AM
01-14-2003 12:02 AM
Hi admins,
I am little bit confused, because I have already thought that on HPUX 11.00 is max size of allocated memory by a process restricted only by maxdsiz (maxdsiz_64bit). But it DOES NOT work!!! Even if it is 4GB I cannot allocate more that 800MG-1GB.
One my application reached this limit. So I prepared a simple C program for prove it. I tested it on my 3 L1000 (HPUX 11.00) servers. Every server has different maxdsiz_64, but all have more than 1G and malloc always failed between 800MB and 1GB. On all server is 3,5-4GB RAM and up to 10GB swap. No swapping problem (used < 30%) memory usage 70-80%. But it does not work even if there is 3GB RAM free and swap < 10% from 10GB.
What is wrong? Is there another parameter?
Her is testing C program :
----------------------------------
#include
/*
maxdsiz 3221225472 (0XC0000000)
maxdsiz_64bin 4026531840 (0X00000000F0000000)
maxssiz 268435456 (0X10000000)
maxssiz_64bit 1073741824 (0X40000000)
maxtsiz 1073741824 (0X40000000)
maxtsiz_64bit 1073741824 (0X40000000)
shmmax 4GB
*/
main ()
{
char *t;
int n=1000000;
int i, sum;
int j=790000000;
for (i=1; i< 600; i++) {
sum = i * n + j;
printf("test %i\n", sum);
t = (char *)malloc(sum);
if ((char *)t == (char *)NULL) {
perror ("malloc");
exit (0);
}
free (t);
}
exit (0);
}
/*
Output :
test 791000000
test 792000000
test 793000000
test 794000000
test 795000000
test 796000000
test 797000000
test 798000000
test 799000000
test 800000000
test 801000000
test 802000000
test 803000000
test 804000000
test 805000000
test 806000000
malloc: Not enough space
test 940000000 ?? second L1000 reached this
test 990000000 ?? third L1000
It is alwas reach the same values an all servers!!
*/
I am little bit confused, because I have already thought that on HPUX 11.00 is max size of allocated memory by a process restricted only by maxdsiz (maxdsiz_64bit). But it DOES NOT work!!! Even if it is 4GB I cannot allocate more that 800MG-1GB.
One my application reached this limit. So I prepared a simple C program for prove it. I tested it on my 3 L1000 (HPUX 11.00) servers. Every server has different maxdsiz_64, but all have more than 1G and malloc always failed between 800MB and 1GB. On all server is 3,5-4GB RAM and up to 10GB swap. No swapping problem (used < 30%) memory usage 70-80%. But it does not work even if there is 3GB RAM free and swap < 10% from 10GB.
What is wrong? Is there another parameter?
Her is testing C program :
----------------------------------
#include
/*
maxdsiz 3221225472 (0XC0000000)
maxdsiz_64bin 4026531840 (0X00000000F0000000)
maxssiz 268435456 (0X10000000)
maxssiz_64bit 1073741824 (0X40000000)
maxtsiz 1073741824 (0X40000000)
maxtsiz_64bit 1073741824 (0X40000000)
shmmax 4GB
*/
main ()
{
char *t;
int n=1000000;
int i, sum;
int j=790000000;
for (i=1; i< 600; i++) {
sum = i * n + j;
printf("test %i\n", sum);
t = (char *)malloc(sum);
if ((char *)t == (char *)NULL) {
perror ("malloc");
exit (0);
}
free (t);
}
exit (0);
}
/*
Output :
test 791000000
test 792000000
test 793000000
test 794000000
test 795000000
test 796000000
test 797000000
test 798000000
test 799000000
test 800000000
test 801000000
test 802000000
test 803000000
test 804000000
test 805000000
test 806000000
malloc: Not enough space
test 940000000 ?? second L1000 reached this
test 990000000 ?? third L1000
It is alwas reach the same values an all servers!!
*/
Solved! Go to Solution.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-14-2003 12:10 AM
01-14-2003 12:10 AM
Solution
Please check your application executable which is running out of memory.
If the application executable or the process is 32 bit then it cannot access memory more than 960 MB.
you can enable the EXEC_MAGIC option with the executable which can make you access around 1.7GB of memory.
This should be the case with you.
you must be running a 32 bit application!!
Check the proc_mgt and mem_mgt.txt files in /usr/share/doc.
Revert
If the application executable or the process is 32 bit then it cannot access memory more than 960 MB.
you can enable the EXEC_MAGIC option with the executable which can make you access around 1.7GB of memory.
This should be the case with you.
you must be running a 32 bit application!!
Check the proc_mgt and mem_mgt.txt files in /usr/share/doc.
Revert
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-14-2003 01:14 AM
01-14-2003 01:14 AM
Re: 800MB malloc limit???
Thanks a lot for your answer. You was rigth. I have already heard about EXEC_MAGIC but my memory ... :))
Now I allowed third quadrant by : chatr +q3p enable a.out
and application can take ~ 1.8GB memory, what should be enough for a moment.
Again thanks,
Pavel
Now I allowed third quadrant by : chatr +q3p enable a.out
and application can take ~ 1.8GB memory, what should be enough for a moment.
Again thanks,
Pavel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-14-2003 02:29 AM
01-14-2003 02:29 AM
Re: 800MB malloc limit???
However, all those EXEC_MAGIC, q3p or similar features are only used to overcome the 32bit address space limitations. By using 64bit versions of your application all those problems should be history.
Try to build your test program using 64bit and you will see (option +DD64).
Best regards...
Dietmar.
Try to build your test program using 64bit and you will see (option +DD64).
Best regards...
Dietmar.
"Logic is the beginning of wisdom; not the end." -- Spock (Star Trek VI: The Undiscovered Country)
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2026 Hewlett Packard Enterprise Development LP