Lines Matching refs:Alloc
19 BumpPtrAllocator Alloc; in TEST() local
20 int *a = (int*)Alloc.Allocate(sizeof(int), 0); in TEST()
21 int *b = (int*)Alloc.Allocate(sizeof(int) * 10, 0); in TEST()
22 int *c = (int*)Alloc.Allocate(sizeof(int), 0); in TEST()
31 EXPECT_EQ(1U, Alloc.GetNumSlabs()); in TEST()
36 BumpPtrAllocator Alloc(4096, 4096); in TEST() local
37 Alloc.Allocate(3000, 0); in TEST()
38 EXPECT_EQ(1U, Alloc.GetNumSlabs()); in TEST()
39 Alloc.Allocate(3000, 0); in TEST()
40 EXPECT_EQ(2U, Alloc.GetNumSlabs()); in TEST()
41 Alloc.Allocate(3000, 0); in TEST()
42 EXPECT_EQ(3U, Alloc.GetNumSlabs()); in TEST()
48 BumpPtrAllocator Alloc(4096, 4096); in TEST() local
49 Alloc.Allocate(3000, 0); in TEST()
50 EXPECT_EQ(1U, Alloc.GetNumSlabs()); in TEST()
51 Alloc.Allocate(3000, 0); in TEST()
52 EXPECT_EQ(2U, Alloc.GetNumSlabs()); in TEST()
53 Alloc.Reset(); in TEST()
54 EXPECT_EQ(1U, Alloc.GetNumSlabs()); in TEST()
55 Alloc.Allocate(3000, 0); in TEST()
56 EXPECT_EQ(1U, Alloc.GetNumSlabs()); in TEST()
57 Alloc.Allocate(3000, 0); in TEST()
58 EXPECT_EQ(2U, Alloc.GetNumSlabs()); in TEST()
63 BumpPtrAllocator Alloc; in TEST() local
65 a = (uintptr_t)Alloc.Allocate(1, 2); in TEST()
67 a = (uintptr_t)Alloc.Allocate(1, 4); in TEST()
69 a = (uintptr_t)Alloc.Allocate(1, 8); in TEST()
71 a = (uintptr_t)Alloc.Allocate(1, 16); in TEST()
73 a = (uintptr_t)Alloc.Allocate(1, 32); in TEST()
75 a = (uintptr_t)Alloc.Allocate(1, 64); in TEST()
77 a = (uintptr_t)Alloc.Allocate(1, 128); in TEST()
84 BumpPtrAllocator Alloc(4096, 4096); in TEST() local
87 Alloc.Allocate(4096 - sizeof(MemSlab), 0); in TEST()
88 EXPECT_EQ(1U, Alloc.GetNumSlabs()); in TEST()
91 Alloc.Allocate(1, 0); in TEST()
92 EXPECT_EQ(2U, Alloc.GetNumSlabs()); in TEST()
97 BumpPtrAllocator Alloc(128); in TEST() local
99 Alloc.Allocate(200, 0); in TEST()
100 EXPECT_EQ(2U, Alloc.GetNumSlabs()); in TEST()
144 BumpPtrAllocator Alloc(4096, 4096, SlabAlloc); in TEST() local
145 uintptr_t Ptr = (uintptr_t)Alloc.Allocate(3000, 2048); in TEST()