6

I've read on the GHC's documentation and in this answer about the -A and -H options. The first one sets a fixed size for the "allocation area" (or the generation 0 of the garbage collector). The second sets a lower bound on the heap size. If I understand well how generational garbage collection works, objects are allocated on generation 0, and when this one is full, those that are still needed are copied to generation 1 and the others are deallocated. My question is how are "allocation area", generation 0, generation 1, and heap size related? Is it like this:

  • allocation area = generation 0,
  • generation 0 + generation 1 (+ eventually more generations) = heap size?

Then, does -A controls the size of the first one whereas -H sets a lower bound on the size of the whole?

Guillaume Chérel
  • 1,478
  • 8
  • 17

0 Answers0