Free affinity maps on allocation failure and remove redundant idle process affinity loop
All checks were successful
Builds / ExectOS (i686, debug) (push) Successful in 30s
Builds / ExectOS (amd64, release) (push) Successful in 41s
Builds / ExectOS (amd64, debug) (push) Successful in 42s
Builds / ExectOS (i686, release) (push) Successful in 34s

This commit is contained in:
2026-06-10 14:08:07 +02:00
parent 429e4ef6f1
commit c57aa98923
5 changed files with 36 additions and 18 deletions

View File

@@ -238,6 +238,28 @@ KE::Affinity::CreateAffinityMap(IN ULONG CpuCount,
return STATUS_SUCCESS;
}
/**
* Frees a previously allocated affinity map and returns its memory to the pool.
*
* @param AffinityMap
* Supplies a pointer to the affinity map to be freed and destroyed.
*
* @return This routine does not return any value.
*
* @since XT 1.0
*/
XTAPI
VOID
KE::Affinity::DestroyAffinityMap(IN PKAFFINITY_MAP AffinityMap)
{
/* Ensure the map pointer is valid */
if(AffinityMap != NULLPTR)
{
/* Free the memory block back to the kernel pool */
MM::Allocator::FreePool((PVOID)AffinityMap);
}
}
/**
* Locates the next available logical processor to the left (higher topological index) of a specified seed.
*