From: Kris Warkentin <kewarken@qnx.com>
To: Daniel Jacobowitz <drow@false.org>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [patch] clean up potential memory leak in thread.c
Date: Mon, 03 Oct 2005 15:15:00 -0000 [thread overview]
Message-ID: <43414B1C.3070705@qnx.com> (raw)
In-Reply-To: <20051003144022.GA21326@nevyn.them.org>
Actually, that's a pretty good idea. We do that in a number of other
places and I suppose it's no harder to realloc the whole structure than
to just re-create the thread name string.
Consider the patch withdrawn.
cheers,
Kris
Daniel Jacobowitz wrote:
> On Mon, Oct 03, 2005 at 10:30:12AM -0400, Kris Warkentin wrote:
> > We're throwing named thread support into the kernel so I'm keeping an
> > arbitrary length string in there. Would never be a huge memory leak
> but
> > I'm fussy that way.
>
> You don't actually need this to add an arbitrary lenth string; the
> target gets to malloc this, you can use a trailing char[1] or simply
> malloc sizeof(struct) + strlen (char) + 1 and point the char* right
> after the struct.
>
> If it's clearer to do it this way, though, we can go with your patch.
> If you'd rather do that let me know; IIRC there were some formatting
> glitches.
>
> --
> Daniel Jacobowitz
> CodeSourcery, LLC
>
--
Stay up-to-date on all the QNX news! Register at
http://www.qnx.com/news/forms/newsletter.html to
receive our newsletter.
prev parent reply other threads:[~2005-10-03 15:15 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-09-29 17:16 Kris Warkentin
2005-10-02 20:19 ` Daniel Jacobowitz
2005-10-03 14:30 ` Kris Warkentin
2005-10-03 14:40 ` Daniel Jacobowitz
2005-10-03 15:15 ` Kris Warkentin [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=43414B1C.3070705@qnx.com \
--to=kewarken@qnx.com \
--cc=drow@false.org \
--cc=gdb-patches@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox