Free affinity maps on allocation failure and remove redundant idle process affinity loop
This commit is contained in:
@@ -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.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user