• Home
  • Raw
  • Download

Lines Matching refs:Alloc

19   BumpPtrAllocator Alloc;  in TEST()  local
20 int *a = (int*)Alloc.Allocate(sizeof(int), 1); in TEST()
21 int *b = (int*)Alloc.Allocate(sizeof(int) * 10, 1); in TEST()
22 int *c = (int*)Alloc.Allocate(sizeof(int), 1); in TEST()
31 EXPECT_EQ(1U, Alloc.GetNumSlabs()); in TEST()
33 BumpPtrAllocator Alloc2 = std::move(Alloc); in TEST()
34 EXPECT_EQ(0U, Alloc.GetNumSlabs()); in TEST()
44 Alloc = std::move(Alloc2); in TEST()
46 EXPECT_EQ(1U, Alloc.GetNumSlabs()); in TEST()
51 BumpPtrAllocator Alloc; in TEST() local
52 Alloc.Allocate(3000, 1); in TEST()
53 EXPECT_EQ(1U, Alloc.GetNumSlabs()); in TEST()
54 Alloc.Allocate(3000, 1); in TEST()
55 EXPECT_EQ(2U, Alloc.GetNumSlabs()); in TEST()
56 Alloc.Allocate(3000, 1); in TEST()
57 EXPECT_EQ(3U, Alloc.GetNumSlabs()); in TEST()
63 BumpPtrAllocator Alloc; in TEST() local
66 (void)Alloc.Allocate(5000, 1); in TEST()
67 Alloc.Reset(); in TEST()
69 EXPECT_EQ(0u, Alloc.GetNumSlabs()); in TEST()
71 Alloc.Allocate(3000, 1); in TEST()
72 EXPECT_EQ(1U, Alloc.GetNumSlabs()); in TEST()
73 Alloc.Allocate(3000, 1); in TEST()
74 EXPECT_EQ(2U, Alloc.GetNumSlabs()); in TEST()
75 Alloc.Reset(); in TEST()
76 EXPECT_EQ(1U, Alloc.GetNumSlabs()); in TEST()
77 Alloc.Allocate(3000, 1); in TEST()
78 EXPECT_EQ(1U, Alloc.GetNumSlabs()); in TEST()
79 Alloc.Allocate(3000, 1); in TEST()
80 EXPECT_EQ(2U, Alloc.GetNumSlabs()); in TEST()
85 BumpPtrAllocator Alloc; in TEST() local
87 a = (uintptr_t)Alloc.Allocate(1, 2); in TEST()
89 a = (uintptr_t)Alloc.Allocate(1, 4); in TEST()
91 a = (uintptr_t)Alloc.Allocate(1, 8); in TEST()
93 a = (uintptr_t)Alloc.Allocate(1, 16); in TEST()
95 a = (uintptr_t)Alloc.Allocate(1, 32); in TEST()
97 a = (uintptr_t)Alloc.Allocate(1, 64); in TEST()
99 a = (uintptr_t)Alloc.Allocate(1, 128); in TEST()
106 BumpPtrAllocator Alloc; in TEST() local
109 Alloc.Allocate(4096, 1); in TEST()
110 EXPECT_EQ(1U, Alloc.GetNumSlabs()); in TEST()
113 Alloc.Allocate(1, 1); in TEST()
114 EXPECT_EQ(2U, Alloc.GetNumSlabs()); in TEST()
119 BumpPtrAllocator Alloc; in TEST() local
121 Alloc.Allocate(8000, 1); in TEST()
122 EXPECT_EQ(1U, Alloc.GetNumSlabs()); in TEST()
127 BumpPtrAllocator Alloc; in TEST() local
128 Alloc.Allocate(4095, 1); in TEST()
133 Alloc.Allocate(1024, 8192); in TEST()
135 EXPECT_EQ(2U, Alloc.GetNumSlabs()); in TEST()
175 BumpPtrAllocatorImpl<MockSlabAllocator> Alloc; in TEST() local
178 (void)Alloc.Allocate(1, 1); in TEST()
181 (void)Alloc.Allocate(3000, 2048); in TEST()