[lkml]   [2018]   [Mar]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 08/19] perf tools: Add mem2node object
Em Thu, Mar 08, 2018 at 09:58:49AM -0300, Arnaldo Carvalho de Melo escreveu:
> We end up leaking entries when what I'm suggesting you to do is to
> not clobber entries with the return of realloc() (doing it this way most
> of the time leads to bugs), but instead store it to a temp var
> (nentries), and if it succeeds, then you know that you can
> set nentries to entries and go ahead with your nicely shrunk block of
> memory.

> If it fails, then you continue with the original block of memory, that
> continues to have what you just set up, etc.

> Lemme look a third time to your original patch, I must be missing
> something...

I don't think I'm missing anything ;-)

- Arnaldo

 \ /
  Last update: 2018-03-08 14:01    [W:0.071 / U:8.608 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site