Home | History | Annotate | Download | only in JIT

Lines Matching refs:MemMgr

33   std::unique_ptr<JITMemoryManager> MemMgr(
41 uint8_t *FunctionBody1 = MemMgr->startFunctionBody(F1.get(), size);
43 MemMgr->endFunctionBody(F1.get(), FunctionBody1, FunctionBody1 + 1024);
44 EXPECT_TRUE(MemMgr->CheckInvariants(Error)) << Error;
48 uint8_t *FunctionBody2 = MemMgr->startFunctionBody(F2.get(), size);
50 MemMgr->endFunctionBody(F2.get(), FunctionBody2, FunctionBody2 + 1024);
51 EXPECT_TRUE(MemMgr->CheckInvariants(Error)) << Error;
55 uint8_t *FunctionBody3 = MemMgr->startFunctionBody(F3.get(), size);
57 MemMgr->endFunctionBody(F3.get(), FunctionBody3, FunctionBody3 + 1024);
58 EXPECT_TRUE(MemMgr->CheckInvariants(Error)) << Error;
61 MemMgr->deallocateFunctionBody(FunctionBody2);
62 EXPECT_TRUE(MemMgr->CheckInvariants(Error)) << Error;
63 MemMgr->deallocateFunctionBody(FunctionBody1);
64 EXPECT_TRUE(MemMgr->CheckInvariants(Error)) << Error;
65 MemMgr->deallocateFunctionBody(FunctionBody3);
66 EXPECT_TRUE(MemMgr->CheckInvariants(Error)) << Error;
72 std::unique_ptr<JITMemoryManager> MemMgr(
79 const uintptr_t bigFuncSize = (MemMgr->GetDefaultCodeSlabSize() -
85 uint8_t *FunctionBody1 = MemMgr->startFunctionBody(F1.get(), size);
88 MemMgr->endFunctionBody(F1.get(), FunctionBody1, FunctionBody1 + bigFuncSize);
89 EXPECT_TRUE(MemMgr->CheckInvariants(Error)) << Error;
93 uint8_t *FunctionBody2 = MemMgr->startFunctionBody(F2.get(), size);
96 MemMgr->endFunctionBody(F2.get(), FunctionBody2, FunctionBody2 + bigFuncSize);
97 EXPECT_TRUE(MemMgr->CheckInvariants(Error)) << Error;
101 uint8_t *FunctionBody3 = MemMgr->startFunctionBody(F3.get(), size);
104 MemMgr->endFunctionBody(F3.get(), FunctionBody3, FunctionBody3 + bigFuncSize);
105 EXPECT_TRUE(MemMgr->CheckInvariants(Error)) << Error;
108 EXPECT_EQ(3U, MemMgr->GetNumCodeSlabs());
113 uint8_t *FunctionBody4 = MemMgr->startFunctionBody(F4.get(), size);
116 MemMgr->endFunctionBody(F4.get(), FunctionBody4,
118 EXPECT_TRUE(MemMgr->CheckInvariants(Error)) << Error;
122 uint8_t *FunctionBody5 = MemMgr->startFunctionBody(F5.get(), size);
125 MemMgr->endFunctionBody(F5.get(), FunctionBody5,
127 EXPECT_TRUE(MemMgr->CheckInvariants(Error)) << Error;
131 uint8_t *FunctionBody6 = MemMgr->startFunctionBody(F6.get(), size);
134 MemMgr->endFunctionBody(F6.get(), FunctionBody6,
136 EXPECT_TRUE(MemMgr->CheckInvariants(Error)) << Error;
139 EXPECT_EQ(3U, MemMgr->GetNumCodeSlabs());
142 MemMgr->deallocateFunctionBody(FunctionBody2);
143 EXPECT_TRUE(MemMgr->CheckInvariants(Error)) << Error;
144 MemMgr->deallocateFunctionBody(FunctionBody1);
145 EXPECT_TRUE(MemMgr->CheckInvariants(Error)) << Error;
146 MemMgr->deallocateFunctionBody(FunctionBody4);
147 EXPECT_TRUE(MemMgr->CheckInvariants(Error)) << Error;
148 MemMgr->deallocateFunctionBody(FunctionBody3);
149 EXPECT_TRUE(MemMgr->CheckInvariants(Error)) << Error;
150 MemMgr->deallocateFunctionBody(FunctionBody5);
151 EXPECT_TRUE(MemMgr->CheckInvariants(Error)) << Error;
152 MemMgr->deallocateFunctionBody(FunctionBody6);
153 EXPECT_TRUE(MemMgr->CheckInvariants(Error)) << Error;
159 std::unique_ptr<JITMemoryManager> MemMgr(
161 uint8_t *a = (uint8_t *)MemMgr->allocateGlobal(8, 0);
162 uint16_t *b = (uint16_t*)MemMgr->allocateGlobal(16, 2);
163 uint32_t *c = (uint32_t*)MemMgr->allocateGlobal(32, 4);
164 uint64_t *d = (uint64_t*)MemMgr->allocateGlobal(64, 8);
200 EXPECT_EQ(1U, MemMgr->GetNumDataSlabs());
206 std::unique_ptr<JITMemoryManager> MemMgr(
208 size_t Size = 4 * MemMgr->GetDefaultDataSlabSize();
209 uint64_t *a = (uint64_t*)MemMgr->allocateGlobal(64, 8);
210 uint8_t *g = MemMgr->allocateGlobal(Size, 8);
211 uint64_t *b = (uint64_t*)MemMgr->allocateGlobal(64, 8);
230 EXPECT_EQ(2U, MemMgr->GetNumDataSlabs());
236 std::unique_ptr<JITMemoryManager> MemMgr(
238 size_t SlabSize = MemMgr->GetDefaultDataSlabSize();
243 EXPECT_EQ(0U, MemMgr->GetNumDataSlabs());
247 MemMgr->allocateGlobal(Size, 8);
248 EXPECT_EQ(2U, MemMgr->GetNumDataSlabs());
252 MemMgr->allocateGlobal(Size, 8);
253 EXPECT_EQ(3U, MemMgr->GetNumDataSlabs());
259 std::unique_ptr<JITMemoryManager> MemMgr(
261 size_t SlabSize = MemMgr->GetDefaultStubSlabSize();
266 EXPECT_EQ(0U, MemMgr->GetNumDataSlabs());
270 MemMgr->allocateStub(nullptr, Size, 8);
271 EXPECT_EQ(2U, MemMgr->GetNumStubSlabs());
275 MemMgr->allocateStub(nullptr, Size, 8);
276 EXPECT_EQ(3U, MemMgr->GetNumStubSlabs());
281 std::unique_ptr<JITMemoryManager> MemMgr(
283 uint8_t *code1 = MemMgr->allocateCodeSection(256, 0, 1, StringRef());
284 uint8_t *data1 = MemMgr->allocateDataSection(256, 16, 2, StringRef(), true);
285 uint8_t *code2 = MemMgr->allocateCodeSection(257, 32, 3, StringRef());
286 uint8_t *data2 = MemMgr->allocateDataSection(256, 64, 4, StringRef(), false);
287 uint8_t *code3 = MemMgr->allocateCodeSection(258, 64, 5, StringRef());