14 : allocator_(
ResourceScope::create_own_allocator(resources_, initial_size))
27LinearAllocator<> &ResourceScope::create_own_allocator_in_buffer(ResourceDataList &r_resources,
30 const bool free_on_destruct)
47 static_assert(std::is_trivially_destructible_v<ResourceDataList>);
51 auto free_fn = free_on_destruct ?
53 LinearAllocator<> *
allocator =
static_cast<LinearAllocator<> *
>(buffer);
58 LinearAllocator<> *
allocator =
static_cast<LinearAllocator<> *
>(buffer);
66LinearAllocator<> &ResourceScope::create_own_allocator(ResourceDataList &r_resources,
75 return ResourceScope::create_own_allocator_in_buffer(r_resources, buffer, alloc_size,
true);
83 for (ResourceData &resource : resources_) {
84 void *
data = resource.data;
86 if (
data == used_allocator) {
void provide_buffer(void *buffer, const int64_t size)
LinearAllocator & allocator()
ResourceScope(int64_t initial_size=32)
ChunkedListSegment< ResourceData, SegmentCapacity > Segment
void MEM_delete_void(void *vmemh)
BLI_assert(slot->slot_subtype.map==BMO_OP_SLOT_SUBTYPE_MAP_FLT)
void * MEM_new_uninitialized_aligned(size_t len, size_t alignment, const char *str) ATTR_WARN_UNUSED_RESULT ATTR_ALLOC_SIZE(1) ATTR_NONNULL(3)
BMesh const char void * data