We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7f8920b commit 95d9224Copy full SHA for 95d9224
1 file changed
ntoskrnl/mm/ARM3/section.c
@@ -373,9 +373,10 @@ MiInsertInSystemSpace(IN PMMSESSION Session,
373
374
/* Compute the base address */
375
Base = (PVOID)((ULONG_PTR)Session->SystemSpaceViewStart + (i * MI_SYSTEM_VIEW_BUCKET_SIZE));
376
+ NT_ASSERT(((ULONG_PTR)Base & (MI_SYSTEM_VIEW_BUCKET_SIZE - 1)) == 0);
377
378
/* Get the hash entry for this allocation */
- Entry = ((ULONG_PTR)Base & ~(MI_SYSTEM_VIEW_BUCKET_SIZE - 1)) + Buckets;
379
+ Entry = (ULONG_PTR)Base + Buckets;
380
Hash = (Entry >> 16) % Session->SystemSpaceHashKey;
381
382
/* Loop hash entries until a free one is found */
0 commit comments