Lines Matching full:allocator
25 IdAllocator *allocator = id_allocator();
27 EXPECT_FALSE(allocator->InUse(1));
30 ResourceId id1 = allocator->AllocateID();
31 EXPECT_TRUE(allocator->InUse(id1));
35 ResourceId id2 = allocator->AllocateID();
36 EXPECT_TRUE(allocator->InUse(id2));
40 allocator->FreeID(id1);
41 EXPECT_FALSE(allocator->InUse(id1));
44 allocator->FreeID(id2);
45 EXPECT_FALSE(allocator->InUse(id2));
50 IdAllocator *allocator = id_allocator();
53 allocator->AllocateIDAtOrAbove(-1);
59 ids[i] = allocator->AllocateID();
60 EXPECT_TRUE(allocator->InUse(ids[i]));
65 allocator->FreeID(id1);
66 EXPECT_FALSE(allocator->InUse(id1));
67 ResourceId id2 = allocator->AllocateID();
68 EXPECT_TRUE(allocator->InUse(id2));
74 IdAllocator* allocator = id_allocator();
75 ResourceId id = allocator->AllocateID();
76 allocator->FreeID(id);
77 EXPECT_FALSE(allocator->InUse(id));
78 EXPECT_TRUE(allocator->MarkAsUsed(id));
79 EXPECT_TRUE(allocator->InUse(id));
80 ResourceId id2 = allocator->AllocateID();
82 EXPECT_TRUE(allocator->MarkAsUsed(id2 + 1));
83 ResourceId id3 = allocator->AllocateID();
92 IdAllocator* allocator = id_allocator();
93 ResourceId id1 = allocator->AllocateIDAtOrAbove(kOffset);
95 ResourceId id2 = allocator->AllocateIDAtOrAbove(kOffset);
97 ResourceId id3 = allocator->AllocateIDAtOrAbove(kOffset);
104 IdAllocator* allocator = id_allocator();
105 ResourceId id1 = allocator->AllocateIDAtOrAbove(kMaxPossibleOffset);
107 ResourceId id2 = allocator->AllocateIDAtOrAbove(kMaxPossibleOffset);
109 ResourceId id3 = allocator->AllocateIDAtOrAbove(kMaxPossibleOffset);
114 IdAllocator* allocator = id_allocator();
115 ResourceId id1 = allocator->AllocateID();
116 allocator->FreeID(0);
117 allocator->FreeID(id1);
118 allocator->FreeID(id1);
119 allocator->FreeID(id1 + 1);
121 ResourceId id2 = allocator->AllocateID();
122 ResourceId id3 = allocator->AllocateID();