summaryrefslogtreecommitdiff
path: root/ghc/rts/Interpreter.c
diff options
context:
space:
mode:
authorwolfgang <unknown>2003-02-12 23:38:23 +0000
committerwolfgang <unknown>2003-02-12 23:38:23 +0000
commit97bca0b7b11e73f8ca9d05d342c4c459f372fcbf (patch)
tree32471f309821e4d1ba9084d454ee4664bde55dd3 /ghc/rts/Interpreter.c
parentc8a382713b96c134b9a5fc7d6312d7d735fe25ac (diff)
downloadhaskell-97bca0b7b11e73f8ca9d05d342c4c459f372fcbf.tar.gz
[project @ 2003-02-12 23:38:23 by wolfgang]
Threaded RTS: improve ccall performance by allocation parameters as a variable length array instead of using malloc
Diffstat (limited to 'ghc/rts/Interpreter.c')
-rw-r--r--ghc/rts/Interpreter.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/ghc/rts/Interpreter.c b/ghc/rts/Interpreter.c
index 79b883b8d9..0df0f99bc3 100644
--- a/ghc/rts/Interpreter.c
+++ b/ghc/rts/Interpreter.c
@@ -1164,9 +1164,8 @@ run_BCO:
// collection might move the TSO as soon as we call
// suspendThread below.
- void *arguments;
+ W_ arguments[stk_offset];
- arguments = stgMallocWords(stk_offset,"bci_CCALL");
memcpy(arguments, Sp, sizeof(W_) * stk_offset);
#endif
@@ -1213,7 +1212,6 @@ run_BCO:
// back to the TSO stack. It would of course be enough to
// just copy the return value, but we don't know the offset.
memcpy(Sp, arguments, sizeof(W_) * stk_offset);
- free(arguments);
#endif
goto nextInsn;