| 1098 | } |
| 1099 | |
| 1100 | u32 alloc(u32 size, memory_location_t location, u32 align) |
| 1101 | { |
| 1102 | const auto block = get(location); |
| 1103 | |
| 1104 | if (!block) |
| 1105 | { |
| 1106 | vm_log.error("vm::alloc(): Invalid memory location (%u)", +location); |
| 1107 | ensure(location < memory_location_max); // The only allowed locations to fail |
| 1108 | return 0; |
| 1109 | } |
| 1110 | |
| 1111 | return block->alloc(size, nullptr, align); |
| 1112 | } |
| 1113 | |
| 1114 | bool falloc(u32 addr, u32 size, memory_location_t location, const std::shared_ptr<utils::shm>* src) |
| 1115 | { |
no test coverage detected