Home | History | Annotate | Download | only in Support

Lines Matching full:alloc

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