Import Upstream version 20180207
[hcoop/debian/mlton.git] / runtime / gc / garbage-collection.h
CommitLineData
7f918cf1
CE
1/* Copyright (C) 2009 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.
5 *
6 * MLton is released under a BSD-style license.
7 * See the file MLton-LICENSE for details.
8 */
9
10#if (defined (MLTON_GC_INTERNAL_FUNCS))
11
12static void minorGC (GC_state s);
13static void majorGC (GC_state s, size_t bytesRequested, bool mayResize);
14static inline void growStackCurrent (GC_state s);
15static inline void enterGC (GC_state s);
16static inline void leaveGC (GC_state s);
17static void performGC (GC_state s,
18 size_t oldGenBytesRequested,
19 size_t nurseryBytesRequested,
20 bool forceMajor,
21 bool mayResize);
22static inline void ensureInvariantForMutator (GC_state s, bool force);
23static inline void ensureHasHeapBytesFree (GC_state s,
24 size_t oldGenBytesRequested,
25 size_t nurseryBytesRequested);
26
27#endif /* (defined (MLTON_GC_INTERNAL_FUNCS)) */
28
29#if (defined (MLTON_GC_INTERNAL_BASIS))
30
31PRIVATE void GC_collect (GC_state s, size_t bytesRequested, bool force);
32
33#endif /* (defined (MLTON_GC_INTERNAL_BASIS)) */