summaryrefslogtreecommitdiff
path: root/rts/eventlog
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2009-08-04 09:21:15 +0000
committerSimon Marlow <marlowsd@gmail.com>2009-08-04 09:21:15 +0000
commite9f5a98d3ce9c8999b9b229affab9eaa137337da (patch)
tree2a4a40940eb4424014908025f902c0a5822fb37f /rts/eventlog
parent086827c0811f1327c86b540111dfb62f378c96e9 (diff)
downloadhaskell-e9f5a98d3ce9c8999b9b229affab9eaa137337da.tar.gz
fix off-by-one in memory allocation
Diffstat (limited to 'rts/eventlog')
-rw-r--r--rts/eventlog/EventLog.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/rts/eventlog/EventLog.c b/rts/eventlog/EventLog.c
index 7f93d73d00..4786358004 100644
--- a/rts/eventlog/EventLog.c
+++ b/rts/eventlog/EventLog.c
@@ -139,7 +139,7 @@ initEventLogging(void)
debugTrace(DEBUG_eventlog, "intiEventLog: start");
- event_log_filename = stgMallocBytes(strlen(prog_name) + 9,
+ event_log_filename = stgMallocBytes(strlen(prog_name) + 10,
"initEventLogging");
if (sizeof(EventDesc) / sizeof(char*) != NUM_EVENT_TAGS) {
@@ -399,7 +399,7 @@ printAndClearEventLog(Capability *cap)
void initEventsBuf(EventsBuf* eb, StgWord64 size)
{
- eb->begin = eb->pos = malloc(size);
+ eb->begin = eb->pos = stgMallocBytes(size, "initEventsBuf");
eb->size = size;
}