Operating System - Linux
1753928 Members
8781 Online
108810 Solutions
New Discussion юеВ

Re: errno=12 Not enough space

 
SOLVED
Go to solution
xinm
Advisor

errno=12 Not enough space

Dear friends:
When I run a C++ program ,it happens errors atтАЬopendir()тАЭ function:
Errno=12, strerror(errno):Not enough space.

Then I check тАЬ/usr/include/sys/errno.hтАЭ:
#define ENOMEM 12 /* Not enough core */

MY ProgramтАЩs Environment:
>>machine : ia64 hp server rx4640
Memory = 16371 MB (15.987305 GB)

>>OS info:
sysname = HP-UX
release = B.11.23

>>gcc -v
Reading specs from /usr/local/lib/gcc/ia64-hp-hpux11.23/3.4.2/specs
Configured with: /scratch/njs/pkgbuild/3.3.1/hpux-11/gcc-3.4.2/configure --enable-languages=c,c++ --enable-threads=posix --with-gnu-as --without-gnu-ld --with-as=/usr/local/bin/as --prefix=/usr/local
Thread model: posix
gcc version 3.4.2

>>swapinfo -ta
Kb Kb Kb PCT START/ Kb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 16777216 0 16777216 0% 0 - 1 /dev/vg00/lvol2
reserve - 266800 -266800
memory 16764044 2573212 14190832 15%
total 33541260 2840012 30701248 8% - 0 -

I hope somebody can help me.
Thanks!
6 REPLIES 6
xinm
Advisor

Re: errno=12 Not enough space

adds other machinfo:
>>df -k
/develop (/dev/vg00/lvdev ) : 119131172 total allocated Kb
58292288 free allocated Kb
Darrel Louis
Honored Contributor

Re: errno=12 Not enough space

Hi,

Do you see any error messages in your syslog, something like could not fork or no buffer space?
What's the output of the following:
- vmstat 5 5
- sar -v 2 10
- swapinfo -tam

http://www.docs.hp.com/en/B2355-60105/bufpages.5.html

Goodluck
Darrel
V. Nyga
Honored Contributor
Solution

Re: errno=12 Not enough space

Hi,

could be hard disk, but I think you've to configure your kernel parameters.
Check these:
http://h21007.www2.hp.com/portal/site/dspp/menuitem.a71dd5247f6a9513ebc5545704b4e601/?javax.portlet.begCacheTok=com.vignette.cachetoken&javax.portlet.prp_31583f33917665b2a95994108973a801_wcproxyurl=http%3A//h21007.www2.hp.com/portal/download/mailinglist_archives/cxx-dev/cxx-dev.9812/0064.html&javax.portlet.endCacheTok=com.vignette.cachetoken&javax.portlet.prp_31583f33917665b2a95994108973a801_viewI...
http://h21007.www2.hp.com/portal/site/dspp/menuitem.a71dd5247f6a9513ebc5545704b4e601/?javax.portlet.begCacheTok=com.vignette.cachetoken&javax.portlet.prp_31583f33917665b2a95994108973a801_wcproxyurl=http%3A//h21007.www2.hp.com/portal/download/mailinglist_archives/cxx-dev/cxx-dev.9808/0036.html&javax.portlet.endCacheTok=com.vignette.cachetoken&javax.portlet.prp_31583f33917665b2a95994108973a801_viewI...
or increase maxdsiz :
http://h21007.www2.hp.com/portal/site/dspp/menuitem.a71dd5247f6a9513ebc5545704b4e601/?javax.portlet.begCacheTok=com.vignette.cachetoken&javax.portlet.prp_31583f33917665b2a95994108973a801_wcproxyurl=http%3A//h21007.www2.hp.com/portal/download/mailinglist_archives/hpux-devtools/hpux-devtools.0102/0044.html&javax.portlet.endCacheTok=com.vignette.cachetoken&javax.portlet.prp_31583f33917665b2a959941089...

To find the resource that causes this error maybe this helps:
http://h21007.www2.hp.com/portal/site/dspp/PAGE.template/page.document?ciid=0408725cc2f02110725cc2f02110275d6e10RCRD&jumpid=reg_R1002_USEN

... I hope the links work ...

HTH
Volkmar
*** Say 'Thanks' with Kudos ***
Dennis Handly
Acclaimed Contributor

Re: errno=12 Not enough space

The first thing you should do is read the man page under opendir(3). ENOMEM points to malloc(3).
As Volkmar said, your maxdsiz is probably too low.
xinm
Advisor

Re: errno=12 Not enough space

thanks all├п┬╝
When I set maxdsiz_64bit,erveything is ok!
xinm
Advisor

Re: errno=12 Not enough space

thanks all!