Lines Matching defs:Alloc
20 BumpPtrAllocator Alloc;
21 int *a = (int*)Alloc.Allocate(sizeof(int), 0);
22 int *b = (int*)Alloc.Allocate(sizeof(int) * 10, 0);
23 int *c = (int*)Alloc.Allocate(sizeof(int), 0);
32 EXPECT_EQ(1U, Alloc.GetNumSlabs());
37 BumpPtrAllocator Alloc(4096, 4096);
38 Alloc.Allocate(3000, 0);
39 EXPECT_EQ(1U, Alloc.GetNumSlabs());
40 Alloc.Allocate(3000, 0);
41 EXPECT_EQ(2U, Alloc.GetNumSlabs());
42 Alloc.Allocate(3000, 0);
43 EXPECT_EQ(3U, Alloc.GetNumSlabs());
49 BumpPtrAllocator Alloc(4096, 4096);
50 Alloc.Allocate(3000, 0);
51 EXPECT_EQ(1U, Alloc.GetNumSlabs());
52 Alloc.Allocate(3000, 0);
53 EXPECT_EQ(2U, Alloc.GetNumSlabs());
54 Alloc.Reset();
55 EXPECT_EQ(1U, Alloc.GetNumSlabs());
56 Alloc.Allocate(3000, 0);
57 EXPECT_EQ(1U, Alloc.GetNumSlabs());
58 Alloc.Allocate(3000, 0);
59 EXPECT_EQ(2U, Alloc.GetNumSlabs());
64 BumpPtrAllocator Alloc;
66 a = (uintptr_t)Alloc.Allocate(1, 2);
68 a = (uintptr_t)Alloc.Allocate(1, 4);
70 a = (uintptr_t)Alloc.Allocate(1, 8);
72 a = (uintptr_t)Alloc.Allocate(1, 16);
74 a = (uintptr_t)Alloc.Allocate(1, 32);
76 a = (uintptr_t)Alloc.Allocate(1, 64);
78 a = (uintptr_t)Alloc.Allocate(1, 128);
85 BumpPtrAllocator Alloc(4096, 4096);
88 Alloc.Allocate(4096 - sizeof(MemSlab), 0);
89 EXPECT_EQ(1U, Alloc.GetNumSlabs());
92 Alloc.Allocate(1, 0);
93 EXPECT_EQ(2U, Alloc.GetNumSlabs());
137 BumpPtrAllocator Alloc(4096, 4096, SlabAlloc);
138 uintptr_t Ptr = (uintptr_t)Alloc.Allocate(3000, 2048);