Lines Matching refs:count
108 TObject* Alloc(int count, u8 alignment = DEFAULT_ALIGNMENT)
110 NW_ASSERT(count >= 0);
111 return static_cast<TObject*>(this->Alloc(sizeof(TObject) * count, alignment));
118 TObject* AllocAndClear(int count, u8 data, u8 alignment = DEFAULT_ALIGNMENT)
120 NW_ASSERT(count >= 0);
121 u8* memory = static_cast<u8*>(this->Alloc(sizeof(TObject) * count, alignment));
125 std::fill_n(memory, count, data);
135 TObject* AllocAndConstruct(int count, u8 alignment = DEFAULT_ALIGNMENT)
137 NW_ASSERT(count >= 0);
138 TObject* objects = static_cast<TObject*>(this->Alloc(sizeof(TObject) * count, alignment));
142 for (int i = 0; i < count; ++i)
155 TObject* AllocAndFill(int count, const TObject& object, u8 alignment = DEFAULT_ALIGNMENT)
157 NW_ASSERT(count >= 0);
158 TObject* objects = static_cast<TObject*>(this->Alloc(sizeof(TObject) * count, alignment));
162 std::fill_n(NW_CHECKED_ARRAY_ITERATOR(objects, count), count, object);
172 void DestructAndFree(TObject* objects, int count) in DestructAndFree() argument
174 NW_ASSERT(count >= 0); in DestructAndFree()
177 for (int i = 0; i < count; ++i) in DestructAndFree()
268 AllocateAndAssignN(os::IAllocator* allocator, int count, TObject object) in AllocateAndAssignN() argument
271 TObject* objects = static_cast<TObject*>(allocator->Alloc(sizeof(TObject) * count)); in AllocateAndAssignN()
274 std::fill_n(objects, count, object); in AllocateAndAssignN()