This file is indexed.

/usr/lib/mlton/include/gc/heap.h is in mlton-basis 20130715-3.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
/* Copyright (C) 2012 Matthew Fluet.
 * Copyright (C) 1999-2008 Henry Cejtin, Matthew Fluet, Suresh
 *    Jagannathan, and Stephen Weeks.
 * Copyright (C) 1997-2000 NEC Research Institute.
 *
 * MLton is released under a BSD-style license.
 * See the file MLton-LICENSE for details.
 */

#if (defined (MLTON_GC_INTERNAL_TYPES))

/*
 * All ML objects (including ML execution stacks) are allocated in a
 * contiguous heap.  The heap has the following general layout:
 * 
 *  -------------------------------------------------------------------------
 *  |    old generation    |               |  nursery  | cardMap | crossMap |
 *  -------------------------------------------------------------------------
 *  |------oldGenSize------|
 *  |-----------------------size-----------------------|
 *  ^                                      ^
 *  start                                  nursery
 *  |------------------------------withMapsSize-----------------------------|
*/

typedef struct GC_heap {
  pointer nursery; /* start of nursery */
  size_t oldGenSize; /* size of old generation */
  size_t size; /* size of heap */
  pointer start; /* start of heap (and old generation) */
  size_t withMapsSize; /* size of heap with card/cross maps */
} *GC_heap;

#define GC_HEAP_LIMIT_SLOP 512

#endif /* (defined (MLTON_GC_INTERNAL_TYPES)) */

#if (defined (MLTON_GC_INTERNAL_FUNCS))

static inline bool isPointerInOldGen (GC_state s, pointer p);
static inline bool isPointerInNursery (GC_state s, pointer p);
#if ASSERT
static inline bool isObjptrInOldGen (GC_state s, objptr op);
#endif
static inline bool isObjptrInNursery (GC_state s, objptr op);
#if ASSERT
static inline bool isObjptrInFromSpace (GC_state s, objptr op);
#endif
static inline bool hasHeapBytesFree (GC_state s, size_t oldGen, size_t nursery);
static inline bool isHeapInit (GC_heap h);

static void displayHeap (GC_state s, GC_heap heap, FILE *stream);

static inline void initHeap (GC_state s, GC_heap h);
static inline size_t sizeofHeapDesired (GC_state s, size_t live, size_t currentSize);

static inline void releaseHeap (GC_state s, GC_heap h);
static void shrinkHeap (GC_state s, GC_heap h, size_t keepSize);
static bool createHeap (GC_state s, GC_heap h, size_t desiredSize, size_t minSize);
static bool createHeapSecondary (GC_state s, size_t desiredSize);
static bool remapHeap (GC_state s, GC_heap h, size_t desiredSize, size_t minSize);
static void growHeap (GC_state s, size_t desiredSize, size_t minSize);
static void resizeHeap (GC_state s, size_t minSize);
static void resizeHeapSecondary (GC_state s);

#endif /* (defined (MLTON_GC_INTERNAL_FUNCS)) */