MCPcopy Create free account
hub / github.com/MegEngine/MegEngine / alloc_from_parent

Method alloc_from_parent

src/core/impl/comp_node/mem_alloc/impl.cpp:247–252  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

245}
246
247MemAllocImplHelper::MemAddr StreamMemAllocImpl::alloc_from_parent(size_t size) {
248 auto addr = m_dev_alloc->alloc(size);
249 MGB_LOCK_GUARD(m_mutex);
250 m_allocated_blocks[addr.addr_ptr()] = {addr.is_head, size};
251 return addr;
252}
253
254void StreamMemAllocImpl::free(void* addr) {
255 MGB_LOCK_GUARD(m_mutex);

Callers

nothing calls this directly

Calls 10

maxFunction · 0.85
addr_ptrMethod · 0.80
minFunction · 0.50
get_aligned_power2Function · 0.50
allocMethod · 0.45
device_typeMethod · 0.45
locatorMethod · 0.45
device_synchronizeMethod · 0.45
set_deviceMethod · 0.45
loadMethod · 0.45

Tested by

no test coverage detected