This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: [PATCH RFA] process/thread/lwp identifier mega-patch


Kevin Buettner wrote:
> [...]

Kevin,

One thought on this (prompted by a side conversation).  From memory you
had concerns with your memory [groan] (i.e. memory leaks).

Have you considered ignoring the problem?  Well actually just
accumulating a list of all the created threads and then, when GDB
re-starts a target, deleting the lot?  Yes, this will clearly not scale
well in an application that creates then deletes millions of threads. 
Hopefully though, the benefits (such as improved performance) of having
per thread objects will far out way this.

I suspect that the way GDB currently tries to delete threads is
technically flawed - it only worked because there was really only one
thread.  A better more robust model needs to be developed but I don't
think solving that problem should be part of this patch.  The person
with the million threads can solve that one :-)

	Andrew


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]