MCPcopy Create free account
hub / github.com/Bareflank/hypervisor / alloc_mk_debug_ring

Function alloc_mk_debug_ring

loader/src/alloc_mk_debug_ring.c:43–53  ·  view source on GitHub ↗

* <!-- description --> * @brief Allocates a chunk of memory for the debug ring that will be * used by the microkernel. * * <!-- inputs/outputs --> * @param pmut_debug_ring the debug_ring_t to store the newly allocated * debug ring * @return LOADER_SUCCESS on success, LOADER_FAILURE on failure. */

Source from the content-addressed store, hash-verified

41 * @return LOADER_SUCCESS on success, LOADER_FAILURE on failure.
42 */
43NODISCARD int64_t
44alloc_mk_debug_ring(struct debug_ring_t **const pmut_debug_ring) NOEXCEPT
45{
46 *pmut_debug_ring = (struct debug_ring_t *)platform_alloc(HYPERVISOR_DEBUG_RING_SIZE);
47 if (NULLPTR == *pmut_debug_ring) {
48 bferror("platform_alloc failed");
49 return LOADER_FAILURE;
50 }
51
52 return LOADER_SUCCESS;
53}

Callers 1

loader_initFunction · 0.85

Calls 2

platform_allocFunction · 0.50
bferrorFunction · 0.50

Tested by

no test coverage detected