Coverage Report

Created: 2018-07-03 15:31

/home/travis/build/MoarVM/MoarVM/src/gc/allocation.h
Line
Count
Source (jump to first uncovered line)
1
#if !defined(MVM_CAN_UNALIGNED_INT64) || !defined(MVM_CAN_UNALIGNED_NUM64)
2
#define MVM_ALIGN_SIZE(size) MVM_ALIGN_SECTION(size)
3
#else
4
#define MVM_ALIGN_SIZE(size) (size)
5
#endif
6
void * MVM_gc_allocate_nursery(MVMThreadContext *tc, size_t size);
7
void * MVM_gc_allocate_zeroed(MVMThreadContext *tc, size_t size);
8
MVMSTable * MVM_gc_allocate_stable(MVMThreadContext *tc, const MVMREPROps *repr, MVMObject *how);
9
MVMObject * MVM_gc_allocate_type_object(MVMThreadContext *tc, MVMSTable *st);
10
MVMObject * MVM_gc_allocate_object(MVMThreadContext *tc, MVMSTable *st);
11
MVMFrame * MVM_gc_allocate_frame(MVMThreadContext *tc);
12
void MVM_gc_allocate_gen2_default_set(MVMThreadContext *tc);
13
void MVM_gc_allocate_gen2_default_clear(MVMThreadContext *tc);
14
15
0
MVM_STATIC_INLINE void * MVM_gc_allocate(MVMThreadContext *tc, size_t size) {
16
0
    return tc->allocate_in_gen2
17
0
        ? MVM_gc_gen2_allocate_zeroed(tc->gen2, size)
18
0
        : MVM_gc_allocate_nursery(tc, MVM_ALIGN_SIZE(size));
19
0
}