[GEM-dev] Re: pix_share broken several ways

chris clepper cgc at humboldtblvd.com
Thu Jun 8 18:07:01 CEST 2006


On 6/8/06, IOhannes m zmoelnig <zmoelnig at iem.at> wrote:
>
> chris clepper wrote:
> > On 6/7/06, *chris clepper* <cgclepper at gmail.com
> > <mailto:cgclepper at gmail.com>> wrote:
> >
> >
> >     Finally, after setting up one shm buffer at an address I can no
> longer
> >     create one at any other address.  I get this message:
> >
> >     pix_share_*: 2048x768x2: 3145728
> >     error: pix_share_*: couldn't get shm_id: error 12
> >
> >
> > pix_share_write might not be releasing the shm object correctly or at
> > all.
>
> you are right. in the process of detecting how big an already segment is
> attached a memory segment and did not properly release it anymore.
>
> i have checked in a fix for this.
>
> actually it is just an "shmdt(h);" below the "m_size=h->size;" below the
> "somebody was faster" warning.


Thanks.  I'll give it a test in a bit.

> I could only get one set up for a ~2.5MB buffer without rebooting
> > to free up more.  OSX might have changed the shmmax defaults to 4MB
> > total in a recent update as well.  I put it to 8MB and can now use a
> > 1024x768x4 buffer after a fresh reboot although changing it to one
> > double that size using the set message fails.
>
> note that you can only resize the buffer to something larger if nothing
> refers to this segment any more.


Ok, I might have missed that in my testing by keeping a pix_share_read open
in another instance of Pd or I could have not removed the object properly
(sometimes I just crtl-c or kill Pd).

Would it be possible to have message that said something like 'Cannot resize
buffer because it is in use by another pix_share_ object'?

cgc
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/gem-dev/attachments/20060608/2d80da18/attachment.htm>


More information about the GEM-dev mailing list