MCPcopy Create free account
hub / github.com/apache/singa / Malloc

Method Malloc

src/core/device/cpp_cpu.cc:56–64  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

54void CppCPU::EvaluateTimeElapsed(Node* node) {}
55
56void* CppCPU::Malloc(int size) {
57 if (size > 0) {
58 void* ptr = malloc(size);
59 memset(ptr, 0, size);
60 return ptr;
61 } else {
62 return nullptr;
63 }
64}
65
66void CppCPU::Free(void* ptr) {
67 if (ptr != nullptr) free(ptr);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected