From 40910fe910d7656278b8b5541346a5f18283cf4b Mon Sep 17 00:00:00 2001 From: Hartmut Birr Date: Thu, 14 Feb 2002 00:07:23 +0000 Subject: [PATCH] Set the min size of an allocated block to the size of the free block header. This fix the gditest bug. svn path=/trunk/; revision=2623 --- reactos/ntoskrnl/mm/ppool.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/reactos/ntoskrnl/mm/ppool.c b/reactos/ntoskrnl/mm/ppool.c index 400b183e35f..22b4b194b8f 100644 --- a/reactos/ntoskrnl/mm/ppool.c +++ b/reactos/ntoskrnl/mm/ppool.c @@ -1,4 +1,4 @@ -/* $Id: ppool.c,v 1.6 2001/12/31 01:53:45 dwelch Exp $ +/* $Id: ppool.c,v 1.7 2002/02/14 00:07:23 hbirr Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -87,6 +87,11 @@ ExAllocatePagedPoolWithTag (IN POOL_TYPE PoolType, * Calculate the total number of bytes we will need. */ BlockSize = NumberOfBytes + sizeof(MM_PPOOL_USED_BLOCK_HEADER); + if (BlockSize < sizeof(MM_PPOOL_FREE_BLOCK_HEADER)) + { + /* At least we need the size of the free block header. */ + BlockSize = sizeof(MM_PPOOL_FREE_BLOCK_HEADER); + } ExAcquireFastMutex(&MmPagedPoolLock);