[switch to fast memory allocator, include jhc command that generated file in output
John Meacham <john@repetae.net>**20051025091719] hunk ./C/FromGrin.hs 115
-    return $  CEFunCall "malloc" [CESizeof node_t]
+    return $  CEFunCall "jhc_malloc" [CESizeof node_t]
hunk ./C/FromGrin.hs 122
-    statement (CSAssign tmp $ CEFunCall "malloc" [CESizeof (if tagIsWHNF t then toStructT t else node_t)])
+    statement (CSAssign tmp $ CEFunCall "jhc_malloc" [CESizeof (if tagIsWHNF t then toStructT t else node_t)])
hunk ./Main.hs 459
-        writeFile cf $ cg -- toUTF8  (prettyC z ++ concatMap (\(i,n) -> "//" ++ 'v':show i ++ " -> " ++ n ++ "\n") (snd us))
+        name <- System.getProgName
+        args <- System.getArgs
+        let argstring = simpleQuote (name:args)
+        writeFile cf $ "char jhc_command[] = \"" ++ argstring ++ "\";\n" ++  cg
hunk ./data/jhc_rts.c 43
-static uintmax_t prof_memory_allocated;
hunk ./data/jhc_rts.c 46
+static void *prof_memstart;
hunk ./data/jhc_rts.c 48
-#define malloc(n) ( prof_memory_allocated += (n), malloc( (n) ) )
hunk ./data/jhc_rts.c 58
+static void *jhc_mem;
+
+static inline void *jhc_malloc(size_t n) {
+        void *ret = jhc_mem;
+        jhc_mem += n;
+        return ret;
+}
hunk ./data/jhc_rts.c 69
-        wprintf(L"Memory Allocated: %llu\n", (long long)prof_memory_allocated);
+        wprintf(L"Command: %s\n", jhc_command);
+        wprintf(L"Memory Allocated: %llu\n", (long long)(jhc_mem - prof_memstart));
hunk ./data/jhc_rts.c 80
+        /* one gig of memory pre-allocated */
+        jhc_mem = malloc(1000000000);
+#ifdef _JHC_PROFILE
+        prof_memstart = jhc_mem;
+#endif
+