| semaphores arr res |

arr := ExternalSemaphoreTable unprotectedExternalObjects.
semaphores := arr reject: #isNil.

res := semaphores collect: [:sema | sema pointersTo reject: [:ptr | ptr == arr or: [ptr == semaphores ] ] ].
res := res select: [ :each | each isEmpty ].
res size.

Yes, that's what I did, I'm sure. All of my images, except a fresh 1.4, answer a number >0.

On 15 February 2012 00:11, Igor Stasenko <siguctua@gmail.com> wrote:
On 15 February 2012 00:54, Milan Mimica <milan.mimica@gmail.com> wrote:
> On 14 February 2012 22:55, Igor Stasenko <siguctua@gmail.com> wrote:
>>
>>
>> semaphores collect: [:sema |
>> � � � �sema ->
>> � � � � � � � �(sema pointersTo reject: [:ptr | ptr == arr or: [ptr ==
>> semaphores ] ] ) ]
>>
>> Can you try invoking it on your image , look for those who has an
>> empty array, which will mean that there is no references to it except
>> semaphore table itself.
>
>
> There is 69 of such semaphores, out of�hundreds�in total. Not much :-/
> On a normal image there is only a few.
>

So, we got a leak somewhere. Can you double-check,
this is semaphores which in the list which
when you inspect that list
will show entries like

a Semaphore() -> #()

but not a total number of entries.

Oh, ok lets just change the code:

| semaphores arr |

arr := ExternalSemaphoreTable unprotectedExternalObjects.
semaphores := arr reject: #isNil.

semaphores reject: [:sema |
� � � (sema pointersTo reject: [:ptr | ptr == arr or: [ptr ==
semaphores ] ] ) isEmpty not ]

so, normally this code should answer an empty array.
If not, then there's leak

--
Best regards,
Igor Stasenko.




--
Milan Mimica
http://sparklet.sf.net