1 /* Copyright (C) 2017 Matthew Fluet.
2 * Copyright (C) 1999-2005 Henry Cejtin, Matthew Fluet, Suresh
3 * Jagannathan, and Stephen Weeks.
4 * Copyright (C) 1997-2000 NEC Research Institute.
6 * MLton is released under a BSD-style license.
7 * See the file MLton-LICENSE for details.
10 #if (defined (MLTON_GC_INTERNAL_TYPES))
13 /* Minimum live ratio to use copying GC. */
15 /* Only use generational GC with copying collection if the ratio of
16 * heap size to live data size is below copyGenerational.
18 float copyGenerational
;
21 /* Desired ratio of heap size to live data. */
23 /* Minimum live ratio to use mark-compact GC. */
25 /* Only use generational GC with mark-compact collection if the
26 * ratio of heap size to live data size is below
27 * markCompactGenerational.
29 float markCompactGenerational
;
30 /* As long as the ratio of bytes live to nursery size is greater
31 * than nurseryRatio, use minor GCs.
35 float stackCurrentGrow
;
36 float stackCurrentMaxReserved
;
37 float stackCurrentPermitReserved
;
38 float stackCurrentShrink
;
39 float stackMaxReserved
;
44 size_t fixedHeap
; /* If 0, then no fixed heap. */
45 size_t maxHeap
; /* if zero, then unlimited, else limit total heap */
47 bool mayPageHeap
; /* Permit paging heap to disk during GC */
48 bool mayProcessAtMLton
;
49 bool messages
; /* Print a message at the start and end of each gc. */
50 size_t oldGenArraySize
; /* Arrays larger are allocated in old gen, if possible. */
51 struct GC_ratios ratios
;
53 bool summary
; /* Print a summary of gc info when program exits. */
57 #endif /* (defined (MLTON_GC_INTERNAL_TYPES)) */
59 #if (defined (MLTON_GC_INTERNAL_FUNCS))
61 static inline bool detailedGCTime (GC_state s
);
62 static inline bool needGCTime (GC_state s
);
64 #endif /* (defined (MLTON_GC_INTERNAL_FUNCS)) */