On Thu, 25.04.13 22:47, Kok, Auke-jan H (auke-jan.h....@intel.com) wrote: > On Wed, Apr 24, 2013 at 5:20 PM, Zbigniew Jędrzejewski-Szmek > <zbys...@in.waw.pl> wrote: > > On Wed, Apr 24, 2013 at 04:26:12PM -0700, Nathaniel Chen wrote: > >> Instead of storing bootchart sample data in arrays, this patch moves > >> storage to linked lists so that there is no more limit on samples. > > > > How does this approach compare to greedy_realloc? > > One of the problems with the static arrays is that it was inherently > allocating way too much memory to begin with. Most tasks live much > less time than (samples * interval), the rest of the array space is > just wasted. > > The linked list approach drives down this memory requirement and makes > navigating all the data much more straightforward. I also much prefer > head pointers instead of having index numbers around.
Still sounds like greedy_realloc() is what you want here. Storing sample data in a dynamically increasing array sounds much more natural than a linked list. Lennart -- Lennart Poettering - Red Hat, Inc. _______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel