mirror of
https://github.com/reactos/reactos.git
synced 2024-12-27 09:34:43 +00:00
Make paged and non-paged memory pools 8-byte aligned.
svn path=/trunk/; revision=6390
This commit is contained in:
parent
2515e0e291
commit
bf57d89032
3 changed files with 11 additions and 7 deletions
|
@ -19,7 +19,12 @@ extern PVOID MmPagedPoolBase;
|
|||
extern ULONG MmPagedPoolSize;
|
||||
|
||||
#define MM_PAGED_POOL_SIZE (100*1024*1024)
|
||||
#define MM_NONPAGED_POOL_SIZE (100*1024*1024)
|
||||
#define MM_NONPAGED_POOL_SIZE (100*1024*1024)
|
||||
|
||||
/*
|
||||
* Paged and non-paged pools are 8-byte aligned
|
||||
*/
|
||||
#define MM_POOL_ALIGNMENT 8
|
||||
|
||||
/*
|
||||
* Maximum size of the kmalloc area (this is totally arbitary)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: npool.c,v 1.75 2003/09/14 09:14:20 hbirr Exp $
|
||||
/* $Id: npool.c,v 1.76 2003/10/20 18:43:11 ekohl Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -1573,8 +1573,7 @@ ExAllocateNonPagedPoolWithTag(ULONG Type, ULONG Size, ULONG Tag, PVOID Caller)
|
|||
KeReleaseSpinLock(&MmNpoolLock, oldIrql);
|
||||
return(NULL);
|
||||
}
|
||||
/* Make the size dword alligned, this makes the block dword alligned */
|
||||
Size = ROUND_UP(Size, sizeof(DWORD));
|
||||
|
||||
|
||||
if (Size >= PAGE_SIZE)
|
||||
{
|
||||
|
@ -1587,7 +1586,7 @@ ExAllocateNonPagedPoolWithTag(ULONG Type, ULONG Size, ULONG Tag, PVOID Caller)
|
|||
}
|
||||
else
|
||||
{
|
||||
alignment = 0;
|
||||
alignment = MM_POOL_ALIGNMENT;
|
||||
}
|
||||
|
||||
best = get_block(Size, alignment);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: ppool.c,v 1.20 2003/10/12 17:05:48 hbirr Exp $
|
||||
/* $Id: ppool.c,v 1.21 2003/10/20 18:43:11 ekohl Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -195,7 +195,7 @@ ExAllocatePagedPoolWithTag (IN POOL_TYPE PoolType,
|
|||
}
|
||||
else
|
||||
{
|
||||
Alignment = 0;
|
||||
Alignment = MM_POOL_ALIGNMENT;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in a new issue