David Welch turned me on to the right way to solve the cygwin fork section

map problem.  This fixes map_dup_inherit.

svn path=/trunk/; revision=8567
This commit is contained in:
Art Yerkes 2004-03-07 17:48:41 +00:00
parent 39078ad027
commit 796f34f5ff

View file

@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/ */
/* $Id: anonmem.c,v 1.25 2004/03/05 11:31:59 hbirr Exp $ /* $Id: anonmem.c,v 1.26 2004/03/07 17:48:41 arty Exp $
* *
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
* FILE: ntoskrnl/mm/anonmem.c * FILE: ntoskrnl/mm/anonmem.c
@ -613,6 +613,19 @@ NtAllocateVirtualMemory(IN HANDLE ProcessHandle,
DPRINT("NtAllocateVirtualMemory() = %x\n",Status); DPRINT("NtAllocateVirtualMemory() = %x\n",Status);
return(Status); return(Status);
} }
else if (MemoryArea != NULL && MemoryArea->Length >= RegionSize)
{
Status =
MmAlterRegion(AddressSpace,
MemoryArea->BaseAddress,
&MemoryArea->Data.SectionData.RegionListHead,
BaseAddress, RegionSize,
Type, Protect, MmModifyAttributes);
MmUnlockAddressSpace(AddressSpace);
ObDereferenceObject(Process);
DPRINT("NtAllocateVirtualMemory() = %x\n",Status);
return(Status);
}
else if (MemoryArea != NULL) else if (MemoryArea != NULL)
{ {
MmUnlockAddressSpace(AddressSpace); MmUnlockAddressSpace(AddressSpace);