dotgnu-libjit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Dotgnu-libjit] Leaking of one struct jit_thread_control per thread.


From: Aleksey Demakov
Subject: Re: [Dotgnu-libjit] Leaking of one struct jit_thread_control per thread.
Date: Wed, 28 May 2008 14:44:10 +0700

On Tue, May 27, 2008 at 10:04 PM, GARCIA DE SORIA LUCENA, JUAN JESUS
<address@hidden> wrote:
> The servers where we run libjit are long-standing servers that create a
> new thread per each request received. These service threads are not
> reused; once they end serving the request they are destroyed, and a new
> one is created when a new request arrives.
>

As a side note, the common wisdom is to use thread
pools rather than create/destroy threads indefinitely.
Probably the original libjit author had this idea that
the number of libjit threads  will be bound to some
reasonably small number so the problem of reclaiming
thread local memory was not addressed in the first
place.

> After looking at some memory leaks we had on those processes, we found
> out that, apart from the function signature leak for which I've
> previously submitted a patch, libjit is leaking one instance of struct
> jit_thread_control for each thread that ends its execution.
>

If there were a function like jit_thread_deatch() that frees
the current thread's TLS data would it resolve the problem
for you or you need automatic deallocation?

Regards,
Aleksey




reply via email to

[Prev in Thread] Current Thread [Next in Thread]