projects
/
ghc-hetmet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
086827c
)
fix off-by-one in memory allocation
author
Simon Marlow
<marlowsd@gmail.com>
Tue, 4 Aug 2009 09:21:15 +0000
(09:21 +0000)
committer
Simon Marlow
<marlowsd@gmail.com>
Tue, 4 Aug 2009 09:21:15 +0000
(09:21 +0000)
rts/eventlog/EventLog.c
patch
|
blob
|
history
diff --git
a/rts/eventlog/EventLog.c
b/rts/eventlog/EventLog.c
index
7f93d73
..
4786358
100644
(file)
--- 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;
}