MCPcopy Create free account
hub / github.com/Simple-XX/SimpleKernel / Free

Method Free

tests/unit_test/virtual_memory_test.cpp:38–47  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36 }
37
38 void Free(void* ptr) {
39 if (ptr == nullptr) {
40 return;
41 }
42 auto it = allocated_blocks_.find(ptr);
43 if (it != allocated_blocks_.end()) {
44 allocated_blocks_.erase(it);
45 free(ptr);
46 }
47 }
48
49 void Reset() {
50 for (auto& [ptr, size] : allocated_blocks_) {

Callers 2

aligned_freeFunction · 0.45
TEST_FFunction · 0.45

Calls 1

freeFunction · 0.85

Tested by

no test coverage detected