On 15 February 2012 00:54, Milan Mimica <milan.mim...@gmail.com> wrote:
> On 14 February 2012 22:55, Igor Stasenko <siguc...@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.

Reply via email to