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

Method malloc

dnn/src/common/megcore/cpu/default_device_context.cpp:23–25  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21void DefaultDeviceContext::activate() noexcept {}
22
23void* DefaultDeviceContext::malloc(size_t size_in_bytes) {
24 return new uint8_t[size_in_bytes];
25}
26
27void DefaultDeviceContext::free(void* ptr) {
28 delete[] static_cast<uint8_t*>(ptr);

Callers 1

megcoreMallocFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected