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

Function platform_free

loader/windows/src/platform.c:164–172  ·  view source on GitHub ↗

* <!-- description --> * @brief This function frees memory previously allocated using the * platform_alloc() function. * * <!-- inputs/outputs --> * @param ptr the pointer returned by platform_alloc(). If ptr is * passed a nullptr, it will be ignored. Attempting to free memory * more than once results in UB. * @param size the number of bytes that were allocated. Note that

Source from the content-addressed store, hash-verified

162 * may or may not be ignored depending on the platform.
163 */
164void
165platform_free(void const *const ptr, uint64_t const size) NOEXCEPT
166{
167 (void)size;
168
169 if (NULLPTR != ptr) {
170 ExFreePoolWithTag((void *)ptr, BF_TAG);
171 }
172}
173
174/**
175 * <!-- description -->

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected