[systemd-devel] [PATCH] Dynamically allocate bootchart logs
Kok, Auke-jan H
auke-jan.h.kok at intel.com
Thu Apr 25 22:47:04 PDT 2013
On Wed, Apr 24, 2013 at 5:20 PM, Zbigniew Jędrzejewski-Szmek
<zbyszek at 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.
Auke
More information about the systemd-devel
mailing list