Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Daniel Berlin <dan@cgsoftware.com>
To: jtc@redback.com
Cc: Daniel Berlin <dan@cgsoftware.com>, gdb-patches@sources.redhat.com
Subject: Re: [RFC]: Greatly speed symbol lookups
Date: Thu, 31 May 2001 15:10:00 -0000	[thread overview]
Message-ID: <87vgmhi31c.fsf@dynamic-addr-83-177.resnet.rochester.edu> (raw)
In-Reply-To: <5mg0dl2o67.fsf@jtc.redback.com>

jtc@redback.com (J.T. Conklin) writes:

> >>>>> "dan" == Daniel Berlin <dan@cgsoftware.com> writes:
> Just a nit, but why the change from xfree() to free()?  In the recent
> past, we've been changing the remaining calls to free() to xfree().

Complete accident, actually.
I would have taken them out of the patch, except I couldn't remember
which way we were going (IE free->xfree or xfree->free).

> 
> If this code was to change, I'd think that we'd take advantage of the
> behavior of xfree() and do something like:
> 
>         xfree (subfile->name);
>         xfree (subfile->dirname);
>         xfree (subfile->line_vector);
>         xfree (subfile->debugformat);
> 
>         nextsub = subfile->next;
>         xfree (subfile);
> 
> dan> *** 995,1017 ****
> dan>   	}
> dan>         if (subfile->name != NULL)
> dan>   	{
> dan> ! 	  xfree ((void *) subfile->name);
> dan>   	}
> dan>         if (subfile->dirname != NULL)
> dan>   	{
> dan> ! 	  xfree ((void *) subfile->dirname);
> dan>   	}
> dan>         if (subfile->line_vector != NULL)
> dan>   	{
> dan> ! 	  xfree ((void *) subfile->line_vector);
> dan>   	}
> dan>         if (subfile->debugformat != NULL)
> dan>   	{
> dan> ! 	  xfree ((void *) subfile->debugformat);
> dan>   	}
> dan>  
> dan>         nextsub = subfile->next;
> dan> !       xfree ((void *) subfile);
> dan>       }
> dan>  
> dan>     /* Set this for the main source file.  */
> dan> --- 991,1013 ----
> dan>   	}
> dan>         if (subfile->name != NULL)
> dan>   	{
> dan> ! 	  free ((void *) subfile->name);
> dan>   	}
> dan>         if (subfile->dirname != NULL)
> dan>   	{
> dan> ! 	  free ((void *) subfile->dirname);
> dan>   	}
> dan>         if (subfile->line_vector != NULL)
> dan>   	{
> dan> ! 	  free ((void *) subfile->line_vector);
> dan>   	}
> dan>         if (subfile->debugformat != NULL)
> dan>   	{
> dan> ! 	  free ((void *) subfile->debugformat);
> dan>   	}
> dan>  
> dan>         nextsub = subfile->next;
> dan> !       free ((void *) subfile);
> dan>       }
> 
> 
> -- 
> J.T. Conklin
> RedBack Networks

-- 
"I bought a dog the other day...  I named him Stay.  It's fun to
call him...  "Come here, Stay!  Come here, Stay!"  He went
insane.  Now he just ignores me and keeps typing.  He's an East
German Shepherd.
"-Steven Wright


  reply	other threads:[~2001-05-31 15:10 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-05-31 13:54 Daniel Berlin
2001-05-31 14:39 ` J.T. Conklin
2001-05-31 15:10   ` Daniel Berlin [this message]
2001-06-06  9:07     ` Andrew Cagney

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=87vgmhi31c.fsf@dynamic-addr-83-177.resnet.rochester.edu \
    --to=dan@cgsoftware.com \
    --cc=gdb-patches@sources.redhat.com \
    --cc=jtc@redback.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