comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » shmmap error
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
shmmap error [message #89057] Sun, 20 July 2014 09:43 Go to previous message
Russell Ryan is currently offline  Russell Ryan
Messages: 122
Registered: May 2012
Senior Member
I'm trying to create a large shared memory segment using the System V memory. This is the command I try to issue:

IDL> shmmap,type=4,dimension=[20000,20000],get_name=seg,get_os_ha ndle=os,/sysv

To create a 2d floating point array of 20,000 by 20,000. I get the following error:

% SHMMAP: Unable to create shared memory segment.
Invalid argument

When I first go this error, I thought it was because the sysv maximum memory was set below this mark. So I reset the kernel setting the file:

/etc/sysctl.conf

with the value: kern.sysv.shmmax=1073741824 to allow 1 Gb of shared memory. This didn't fix the problem. I then tried creating the same memory segment to be 2,000 by 2,000 (still floating point) and got a slightly different error:

IDL> shmmap,type=4,dimension=[2000,2000],get_name=seg,get_os_hand le=os,/sysv
% SHMMAP: Unable to create shared memory segment.
Cannot allocate memory

So, now I'm puzzled. Does anyone have an idea to fix this and still use System V memory? If not, can I have shmmap return an error or status so I can have the code safely avoid crashing?

To be clear, I've tried on two different computers, both running Mac OS 8, but one is IDL 7.1 and other is IDL 8.1. These are the relevant SHM settings in my sysctl:

prompt> sysctl -a | grep shm
kern.sysv.shmmax: 1073741824
kern.sysv.shmmin: 1
kern.sysv.shmmni: 32
kern.sysv.shmseg: 8
kern.sysv.shmall: 1024
machdep.pmap.hashmax: 28
security.mac.posixshm_enforce: 1
security.mac.sysvshm_enforce: 1


Thanks! Russell

PS, I'm doing this to create an IDL object to interface with ds9 (an astronomical image viewing routine). ds9 (and XPA tools) seem to only want sysv memory segments. IF any astronomer knows to the contrary and knows how to POSIX memory that would be a fine work-around.
[Message index]
 
Read Message
Read Message
Previous Topic: Multiresolution analysis based on maximum overlap discrete wavelet transform and the Haar wavelet
Next Topic: Re: Case Insensitive Hash but still preserve cases of original keys

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 20:07:55 PDT 2025

Total time taken to generate the page: 0.42400 seconds