少年修仙传客户端基础资源
hch
2024-04-01 d01413b00ef631ac20347716b23818b0b811f65f
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
#include "il2cpp-config.h"
 
#include "il2cpp-class-internals.h"
#include "icalls/mscorlib/System/GC.h"
#include "gc/GarbageCollector.h"
#include "vm/Exception.h"
#include "vm/Object.h"
#include "vm/Array.h"
 
namespace il2cpp
{
namespace icalls
{
namespace mscorlib
{
namespace System
{
    void GC::SuppressFinalize(Il2CppObject *obj)
    {
        if (obj == NULL)
            il2cpp::vm::Exception::Raise(il2cpp::vm::Exception::GetArgumentNullException("obj"));
 
        il2cpp::gc::GarbageCollector::SuppressFinalizer(obj);
    }
 
    int32_t GC::GetGeneration(Il2CppObject* obj)
    {
        return il2cpp::gc::GarbageCollector::GetGeneration(obj);
    }
 
    void GC::KeepAlive(Il2CppObject* obj)
    {
        // do nothing. icall just prevents compilers from optimizing away references to object being passed in
    }
 
    void GC::InternalCollect(int generation)
    {
        il2cpp::gc::GarbageCollector::Collect(generation);
    }
 
    int32_t GC::get_MaxGeneration()
    {
        return il2cpp::gc::GarbageCollector::GetMaxGeneration();
    }
 
    void GC::RecordPressure(int64_t bytesAllocated)
    {
        il2cpp::gc::GarbageCollector::AddMemoryPressure(bytesAllocated);
    }
 
    void GC::WaitForPendingFinalizers()
    {
        il2cpp::gc::GarbageCollector::WaitForPendingFinalizers();
    }
 
    int64_t GC::GetTotalMemory(bool forceFullCollection)
    {
        if (forceFullCollection)
            il2cpp::gc::GarbageCollector::Collect(il2cpp::gc::GarbageCollector::GetMaxGeneration());
 
        return il2cpp::gc::GarbageCollector::GetUsedHeapSize();
    }
 
    void GC::ReRegisterForFinalize(Il2CppObject* obj)
    {
        if (obj == NULL)
            il2cpp::vm::Exception::Raise(il2cpp::vm::Exception::GetArgumentNullException("obj"));
 
        il2cpp::gc::GarbageCollector::RegisterFinalizer(obj);
    }
 
    int32_t GC::CollectionCount(int32_t generation)
    {
        return il2cpp::gc::GarbageCollector::GetCollectionCount(generation);
    }
 
    Il2CppObject* GC::get_ephemeron_tombstone()
    {
        return vm::Object::New(il2cpp_defaults.object_class);
    }
 
    void GC::register_ephemeron_array(Il2CppArray* array)
    {
        // Mono only does something in this icall when SGEN is in use.  We don't have SGEN,
        // so there is nothing to do here.
    }
 
    int32_t GC::GetCollectionCount(int32_t generation)
    {
        return CollectionCount(generation);
    }
 
    int32_t GC::GetMaxGeneration()
    {
        return get_MaxGeneration();
    }
 
    void GC::_ReRegisterForFinalize(Il2CppObject* o)
    {
        ReRegisterForFinalize(o);
    }
 
    void GC::_SuppressFinalize(Il2CppObject* o)
    {
        SuppressFinalize(o);
    }
} /* namespace System */
} /* namespace mscorlib */
} /* namespace icalls */
} /* namespace il2cpp */