Lines Matching refs:count
110 TObject* Alloc(int count, u8 alignment = DEFAULT_ALIGNMENT)
112 NW_ASSERT(count >= 0);
113 return static_cast<TObject*>(this->Alloc(sizeof(TObject) * count, alignment));
120 TObject* AllocAndClear(int count, u8 data, u8 alignment = DEFAULT_ALIGNMENT)
122 NW_ASSERT(count >= 0);
123 u8* memory = static_cast<u8*>(this->Alloc(sizeof(TObject) * count, alignment));
127 std::fill_n(memory, count, data);
137 TObject* AllocAndConstruct(int count, u8 alignment = DEFAULT_ALIGNMENT)
139 NW_ASSERT(count >= 0);
140 TObject* objects = static_cast<TObject*>(this->Alloc(sizeof(TObject) * count, alignment));
144 for (int i = 0; i < count; ++i)
157 TObject* AllocAndFill(int count, const TObject& object, u8 alignment = DEFAULT_ALIGNMENT)
159 NW_ASSERT(count >= 0);
160 TObject* objects = static_cast<TObject*>(this->Alloc(sizeof(TObject) * count, alignment));
164 std::fill_n(NW_CHECKED_ARRAY_ITERATOR(objects, count), count, object);
174 void DestructAndFree(TObject* objects, int count) in DestructAndFree() argument
176 NW_ASSERT(count >= 0); in DestructAndFree()
179 for (int i = 0; i < count; ++i) in DestructAndFree()
270 AllocateAndAssignN(os::IAllocator* allocator, int count, TObject object) in AllocateAndAssignN() argument
273 TObject* objects = static_cast<TObject*>(allocator->Alloc(sizeof(TObject) * count)); in AllocateAndAssignN()
276 std::fill_n(objects, count, object); in AllocateAndAssignN()