MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / allocate_memory

Method allocate_memory

Source/ThirdParty/pugixml/pugixml.cpp:353–364  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

351 void* allocate_memory_oob(size_t size, xml_memory_page*& out_page);
352
353 void* allocate_memory(size_t size, xml_memory_page*& out_page)
354 {
355 if (_busy_size + size > xml_memory_page_size) return allocate_memory_oob(size, out_page);
356
357 void* buf = reinterpret_cast<char*>(_root) + sizeof(xml_memory_page) + _busy_size;
358
359 _busy_size += size;
360
361 out_page = _root;
362
363 return buf;
364 }
365
366 void deallocate_memory(void* ptr, size_t size, xml_memory_page* page)
367 {

Callers 3

allocate_attributeFunction · 0.80
allocate_nodeFunction · 0.80
append_bufferMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected