On 07.08.2015 10:04, Sebastian Lackner wrote:
On 07.08.2015 08:57, Nikolay Sivov wrote:
On 07.08.2015 9:22, Sebastian Lackner wrote:
However, this does not fully prevent a leak when frequently unloading / reloading a library using OpenMP... sounds a bit like a design flaw to me.
You could keep a list of allocations to fix that if it's really a problem.
Vcomp wouldn't get notifications for loads/unloads of other libraries, and we also don't know which critical sections belong to which library. A list of allocations could only be used to clean up on process exit. If it is really a problem in practice, I would guess that Windows is affected in a similar way.
Is it possible it allocates one section per thread or something like that? E.g. what do two consecutive _vcomp_enter_critsect() calls return for NULL input, is it same pointer every time for example?