From 97bca0b7b11e73f8ca9d05d342c4c459f372fcbf Mon Sep 17 00:00:00 2001 From: wolfgang Date: Wed, 12 Feb 2003 23:38:23 +0000 Subject: [PATCH] [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 --- ghc/rts/Interpreter.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/ghc/rts/Interpreter.c b/ghc/rts/Interpreter.c index 79b883b..0df0f99 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; -- 1.7.10.4