
29 Mar
2001
29 Mar
'01
9:19 a.m.
I need to change the maximum heap to run a program. I know that I can call my program with the -M option (e.g. myProgram +RTS -M120m -RTS). But in section 3.12.4 of the user guide are some hooks named, which allow one to change different defaults. Unfortunatly I didn't find a Hook that enables me to increase the heap. Is there such a hook? And how do I have to use it? Any other alternatives?
Yes, you want to use defaultsHook(). The flag you need to set is RtsFlags.GcFlags.maxHeapSize, which is in units of BLOCKs (i.e. divide by BLOCK_SIZE). Look in fptools/ghc/compiler/parser/hschooks.c for examples. Cheers, Simon
8871
Age (days ago)
8871
Last active (days ago)
0 comments
1 participants
participants (1)
-
Simon Marlow