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
Re: shmmap error [message #89060 is a reply to message #89057] Mon, 21 July 2014 07:51 Go to previous message
Russell Ryan is currently offline  Russell Ryan
Messages: 122
Registered: May 2012
Senior Member
PPS. I guess my heart is not set on using shared memory segments. I just want to avoid writing the data from IDL to the disk, then reading the new file into ds9. So, I'm open to other suggestions possibly using the socket functionally in IDL.

R



On Sunday, July 20, 2014 12:43:27 PM UTC-4, rr...@stsci.edu wrote:
> 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: Fri Oct 10 08:02:37 PDT 2025

Total time taken to generate the page: 0.56004 seconds