summaryrefslogtreecommitdiff
path: root/rts/sm/NonMovingCensus.h
blob: 164017ecccb06a2cabda6a51040fbbc6f2544e4b (plain)
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
/* -----------------------------------------------------------------------------
 *
 * (c) The GHC Team, 1998-2018
 *
 * Non-moving garbage collector and allocator: Accounting census
 *
 * ---------------------------------------------------------------------------*/

#pragma once

#include "NonMoving.h"

struct NonmovingAllocCensus {
    bool collected_live_words;
    uint32_t n_active_segs;
    uint32_t n_filled_segs;
    uint32_t n_live_blocks;
    uint32_t n_live_words;
};


struct NonmovingAllocCensus
nonmovingAllocatorCensusWithWords(uint32_t alloc_idx);

struct NonmovingAllocCensus
nonmovingAllocatorCensus(uint32_t alloc_idx);

void nonmovingPrintAllocatorCensus(bool collect_live_words);
void nonmovingTraceAllocatorCensus(void);