示例#1
0
 internal static UIntPtr KernelExtend(UIntPtr addr, UIntPtr numPages, Process process,
                                      PageType type)
 {
     //
     // We do not report failure here since callers will default to
     // KernelAllocate and copy if it can't extend the range
     //
     if (useAddressTranslation)
     {
         // TODO: Extend not yet implemented
         DebugStub.Break();
         return(UIntPtr.Zero);
     }
     else
     {
         return(FlatPages.AllocateExtend(addr, BytesFromPages(numPages), process, 0, type));
     }
 }
示例#2
0
        internal static UIntPtr UserExtend(UIntPtr addr, UIntPtr numPages, Process process,
                                           PageType type)
        {
            UIntPtr result = UIntPtr.Zero;

            if (useAddressTranslation)
            {
                // TODO: Extend NYI
                DebugStub.Break();
                result = UIntPtr.Zero;
            }
            else
            {
                result = FlatPages.AllocateExtend(addr, BytesFromPages(numPages), process, 0, type);
            }

            if (result == UIntPtr.Zero)
            {
                UserMemoryFailure();
            }

            return(result);
        }