Lines Matching defs:capacity
24 Area *NativeAreaAllocator::AllocateArea(size_t capacity)
27 if (capacity < headerSize) { // LOCV_EXCL_BR_LINE
28 LOG_ECMA_MEM(FATAL) << "capacity must have a size not less than sizeof Area.";
31 if (cachedArea_ != nullptr && capacity <= cachedArea_->GetSize()) {
37 void *mem = malloc(capacity);
39 LOG_ECMA_MEM(FATAL) << "malloc failed, current alloc size = " << capacity
44 if (memset_s(mem, capacity, 0, capacity) != EOK) { // LOCV_EXCL_BR_LINE
49 IncreaseNativeMemoryUsage(capacity);
52 capacity -= headerSize;
53 return new (mem) Area(begin, capacity);