Operating System - HP-UX
1833034 Members
2552 Online
110049 Solutions
New Discussion

Re: Shared memory question

 
Ramones
Frequent Advisor

Shared memory question

Hi gurus

I have a client that is having problems in access shared memory and getting an shmget error with errno = EINVA.
The size of the segment is not greater than system imposed maximum.
What could be the problem then?


Thanks in advance,
R
3 REPLIES 3
James R. Ferguson
Acclaimed Contributor

Re: Shared memory question

Hi Ramones:

Is this a 32-bit or a 64-bit process and/or are a mixture of both in play?

See the manpages for 'shmget' and the reasons for errno=EINVAL.

http://docs.hp.com/en/B3921-60631/shmget.2.html

Regards!

...JRF...
Steven E. Protter
Exalted Contributor

Re: Shared memory question

Shalom,

How much memory is the progam asking for. HP-UX divides memory into certain areas which may be smaller than the value you think the maximum is.

Also if overall system memory is not high enough this could also effect the maximum memory available. Other processes may have the memory locked.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Don Morris_1
Honored Contributor

Re: Shared memory question

Nope, memory exhaustion won't give EINVAL. James linked in the man page -- the cases it describes for EINVAL are it (I started enumerating them and then cross checked and realized there aren't any the man page didn't describe just as well/better than I likely can anyway).

Memory exhaustion is ENOMEM, btw -- regardless of it being physical or virtual memory exhaustion.