-
Committer:
Matthew Wilcox
-
Author(s):
Michal Schmidt
-
Date:
2009-06-19 20:31:36 UTC
-
Revision ID:
git-v1:14e769d7093179943015ff88d0d3bdd65b2947f7
Use less memory
The linepointer array is huge!:
linepointer = calloc(buflen+1, sizeof(char*));
buflen can be as much as 32 MB, that makes it allocate 32M*8 = 256M on x86_64.
Fix it by growing the allocation dynamically as we find interesting lines in
the log.