Pass requested base address to MmAllocateSection()

svn path=/trunk/; revision=11247
This commit is contained in:
Gé van Geldorp 2004-10-09 12:17:54 +00:00
parent 05cc213374
commit 85ec38bb53
4 changed files with 9 additions and 8 deletions

View file

@ -717,7 +717,7 @@ PMM_REGION MmFindRegion(PVOID BaseAddress, PLIST_ENTRY RegionListHead, PVOID Add
/* section.c *****************************************************************/
PVOID STDCALL
MmAllocateSection (IN ULONG Length);
MmAllocateSection (IN ULONG Length, PVOID BaseAddress);
NTSTATUS STDCALL
MmQuerySectionView(PMEMORY_AREA MemoryArea,

View file

@ -1,4 +1,4 @@
/* $Id: loader.c,v 1.147 2004/10/04 17:27:13 hbirr Exp $
/* $Id: loader.c,v 1.148 2004/10/09 12:17:53 gvg Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@ -776,7 +776,8 @@ LdrPEProcessModule(PVOID ModuleLoadBase,
DPRINT("DriverSize %x, SizeOfImage %x\n",DriverSize, PENtHeaders->OptionalHeader.SizeOfImage);
/* Allocate a virtual section for the module */
DriverBase = MmAllocateSection(DriverSize);
DriverBase = NULL;
DriverBase = MmAllocateSection(DriverSize, DriverBase);
if (DriverBase == 0)
{
CPRINT("Failed to allocate a virtual section for driver\n");

View file

@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/* $Id: pagefile.c,v 1.50 2004/08/15 16:39:08 chorns Exp $
/* $Id: pagefile.c,v 1.51 2004/10/09 12:17:53 gvg Exp $
*
* PROJECT: ReactOS kernel
* FILE: ntoskrnl/mm/pagefile.c
@ -314,7 +314,7 @@ MmInitPagingFile(VOID)
*/
if (MmCoreDumpType != MM_CORE_DUMP_TYPE_NONE)
{
MmCoreDumpPageFrame = MmAllocateSection(PAGE_SIZE);
MmCoreDumpPageFrame = MmAllocateSection(PAGE_SIZE, NULL);
if (MmCoreDumpType == MM_CORE_DUMP_TYPE_FULL)
{
MmCoreDumpSize = MmStats.NrTotalPages * 4096 + 1024 * 1024;

View file

@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/* $Id: section.c,v 1.164 2004/10/01 20:06:43 gvg Exp $
/* $Id: section.c,v 1.165 2004/10/09 12:17:54 gvg Exp $
*
* PROJECT: ReactOS kernel
* FILE: ntoskrnl/mm/section.c
@ -3636,7 +3636,7 @@ NtExtendSection(IN HANDLE SectionHandle,
* REVISIONS
*/
PVOID STDCALL
MmAllocateSection (IN ULONG Length)
MmAllocateSection (IN ULONG Length, PVOID BaseAddress)
{
PVOID Result;
MEMORY_AREA* marea;
@ -3650,7 +3650,7 @@ MmAllocateSection (IN ULONG Length)
BoundaryAddressMultiple.QuadPart = 0;
AddressSpace = MmGetKernelAddressSpace();
Result = NULL;
Result = BaseAddress;
MmLockAddressSpace(AddressSpace);
Status = MmCreateMemoryArea (NULL,
AddressSpace,