From c6476093e10160b4662a17c356c5dd319db11167 Mon Sep 17 00:00:00 2001 From: David Welch Date: Mon, 15 Mar 2004 00:03:31 +0000 Subject: [PATCH] - Fixed whole page allocations since the handle table code now relies on allocations being eight byte aligned. svn path=/trunk/; revision=8743 --- reactos/ntoskrnl/mm/npool.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/reactos/ntoskrnl/mm/npool.c b/reactos/ntoskrnl/mm/npool.c index 4e4d651e04e..9c6e564ed0f 100644 --- a/reactos/ntoskrnl/mm/npool.c +++ b/reactos/ntoskrnl/mm/npool.c @@ -1,4 +1,4 @@ -/* $Id: npool.c,v 1.82 2004/03/04 00:07:01 navaraf Exp $ +/* $Id: npool.c,v 1.83 2004/03/15 00:03:31 dwelch Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -35,7 +35,7 @@ * end of the range so any accesses beyond the end of block are to invalid * memory locations. */ -/*#define WHOLE_PAGE_ALLOCATIONS*/ +#define WHOLE_PAGE_ALLOCATIONS #ifdef ENABLE_VALIDATE_POOL #define VALIDATE_POOL validate_kernel_pool() @@ -1678,6 +1678,7 @@ ExAllocateWholePageBlock(ULONG Size) } MiCurrentNonPagedPoolLength = max(MiCurrentNonPagedPoolLength, (Base + NrPages) * PAGE_SIZE); + Size = (Size + 7) & ~7; return((PVOID)((PUCHAR)Address + (NrPages * PAGE_SIZE) - Size)); }