summaryrefslogtreecommitdiffstats
path: root/lib/Plugins/KerneloopsSysLog.h
diff options
context:
space:
mode:
authorAnton Arapov <aarapov@redhat.com>2009-06-20 23:06:06 +0200
committerAnton Arapov <aarapov@redhat.com>2009-06-20 23:06:06 +0200
commit7ea90a7e6e836257e05d2f9f6b5ad0f9aab88c23 (patch)
tree844fb123678cef81cec60ae86e312f5c9306c67d /lib/Plugins/KerneloopsSysLog.h
parent7035b97b4b19360d46c3190e698ac875ff99af37 (diff)
downloadabrt-7ea90a7e6e836257e05d2f9f6b5ad0f9aab88c23.tar.gz
abrt-7ea90a7e6e836257e05d2f9f6b5ad0f9aab88c23.tar.xz
abrt-7ea90a7e6e836257e05d2f9f6b5ad0f9aab88c23.zip
Use less memory
* backport of 14e769d7093179943015ff88d0d3bdd65b2947f7 * Author: Michal Schmidt <mschmidt@redhat.com> 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.
Diffstat (limited to 'lib/Plugins/KerneloopsSysLog.h')
-rw-r--r--lib/Plugins/KerneloopsSysLog.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Plugins/KerneloopsSysLog.h b/lib/Plugins/KerneloopsSysLog.h
index 66dfa546..c233d993 100644
--- a/lib/Plugins/KerneloopsSysLog.h
+++ b/lib/Plugins/KerneloopsSysLog.h
@@ -42,7 +42,7 @@ class CSysLog
private:
void QueueOops(char *data, char *version);
int ExtractVersion(char *linepointer, char *version);
- void FillLinePointers(char *buffer, int remove_syslog);
+ int FillLinePointers(char *buffer, int remove_syslog);
std::list<COops> m_OopsQueue;
int m_nFoundOopses;