- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- malloc() - Error No 12
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
тАО06-25-2008 12:19 PM
тАО06-25-2008 12:19 PM
Any ideas?
Thanks,
Solved! Go to Solution.
- Tags:
- malloc
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-25-2008 12:37 PM
тАО06-25-2008 12:37 PM
Re: malloc() - Error No 12
Well, errno = 12 = ENOMEM
If this is a 32-bit process, then 'maxdsiz' sets the limit. If this is a64-bit process, then 'maxdsiz_64bit'
This can also be caused by a lack of swap space. Verify with 'swapinfo -tam'.
Regards!
...JRF...
- Tags:
- maxdsiz
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-25-2008 12:48 PM
тАО06-25-2008 12:48 PM
Re: malloc() - Error No 12
Now, I just recompiled this small program that I wrote with +dd64 and then when I run it it goes further...but before it dies earlier and the issue is why it only goes to 889MB on this box but much further on the other box that is darn near identical...kernel bits, maxdsiz, dsiz_64bit, tsiz, ssize, swap, etc...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-25-2008 12:54 PM
тАО06-25-2008 12:54 PM
Re: malloc() - Error No 12
< dbc_max_pct 3 3 Immed
< dbc_min_pct 2 2 Immed
---
> dbc_max_pct 12 12 Immed
> dbc_min_pct 5 Default Immed
53c53
< maxdsiz 1073741824 1073741824 Immed
---
> maxdsiz 1073741824 Default Immed
59c59
< maxssiz 134217728 134217728 Immed
---
> maxssiz 8388608 Default Immed
62c62
< maxtsiz_64bit 1073741824 1073741824 Immed
---
> maxtsiz_64bit 1073741824 Default Immed
64c64
< maxvgs 256 256
---
> maxvgs 100 100
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-25-2008 01:06 PM
тАО06-25-2008 01:06 PM
Re: malloc() - Error No 12
What I'm saying is that a 32-bit applications is goverened by 'maxdsiz' --- not 'maxdsiz_64-bit'. Further, a 32-bit appplication has a data size limit of about 940MB unless it has been enabled with 'chatr' to be an 'EXEC_MAGIC' executable and then the limit is ~ 1.9 GB for the data space.
Do a 'file' on your executable. Unless is says "ELF-64" or "LP64" it's a 32-bit application. COmpiling with "+DA2.0W" will generate a 64-bit application.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-25-2008 01:11 PM
тАО06-25-2008 01:11 PM
Re: malloc() - Error No 12
Any ideas on why that might be?
Thanks so much!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-25-2008 03:56 PM
тАО06-25-2008 03:56 PM
Re: malloc() - Error No 12
Anyway -- the difference in the machines in the difference in maxssiz:
< maxssiz 134217728 134217728 Immed
---
> maxssiz 8388608 Default Immed
The default layout for 32-bit applications is 2 private quadrants and 2 shared quadrants. One private quadrant is used for the Text (yes, there's a lot of virtual address space that's unused for small programs... but there's optimizations when you have the same binary run in many places and only Read+Executable. Performance is a good thing... and that's why EXEC_MAGIC isn't the default).
The other private quadrant holds all other private objects -- that's your heap [where the malloc is going] _and_ MAP_PRIVATE mmap objects _and_ most importantly, your stack. The stack grows from low addresses to high -- so in order for maxssiz to work, the stack *must* start maxssiz (rounded down to a page) before the end of the private quadrant. You can't span the quadrant.
So a higher maxssiz means you have less space for other private data... such as your malloc() space. On one system, you have 128Mb of virtual address space reserved for stack consumption. No malloc() over 896Mb [minus 4096 bytes, but close enough] will be possible... because you hit the stack.
On the other, the stack is only 8Mb, hence you have around 1016Mb available for other private objects.
Or in short, if you want more data -- lower maxssiz.
- Tags:
- maxssiz
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-26-2008 12:26 AM
тАО06-26-2008 12:26 AM
Re: malloc() - Error No 12
For PA you can get 3 Gb without -N by using chatr +q3p enable +q4p enable
>Compiling with "+DA2.0W" will generate a 64-bit application.
+DD64 should be used instead of the obsolete +DA2.0W form.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-26-2008 07:05 AM
тАО06-26-2008 07:05 AM
Re: malloc() - Error No 12
I appreciate all of the education that I am getting here. My question is simply why would it be able to allocate more memory on one system than the other.
The smaller maxssiz is set on the system that is able to allocate more memory...
Thanks,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-26-2008 08:00 AM
тАО06-26-2008 08:00 AM
SolutionIf you have X Gb [in this case 1] available as potential malloc space, and you always take away maxssiz -- the bigger maxssiz is, the less you have left. Hence the machine that can malloc more, does so because maxssiz is smaller (and the stack reserves less virtual address space).