mirror of
https://github.com/reactos/reactos.git
synced 2025-04-28 01:11:35 +00:00
Merge 36852, 37322, 37333, 37334, 43428, 43451, 44259, 46404 from amd64 branch.
- Multiple ULONG/ULONG_PTR/SIZE_T issues - Use SLIST_ENTRY instead of SINGLE_LIST_ENTRY with InterlockedPushEntrySList - Use %p to print pointer sized values svn path=/trunk/; revision=48073
This commit is contained in:
parent
8e13b57dcf
commit
d80d59dbff
14 changed files with 59 additions and 59 deletions
|
@ -889,7 +889,7 @@ KeInvalidAccessAllowed(IN PVOID TrapInformation OPTIONAL);
|
|||
VOID
|
||||
NTAPI
|
||||
KeRosDumpStackFrames(
|
||||
PULONG Frame,
|
||||
PULONG_PTR Frame,
|
||||
ULONG FrameCount
|
||||
);
|
||||
|
||||
|
|
|
@ -6,21 +6,21 @@
|
|||
|
||||
struct _EPROCESS;
|
||||
|
||||
extern ULONG MiFreeSwapPages;
|
||||
extern ULONG MiUsedSwapPages;
|
||||
extern ULONG MmPagedPoolSize;
|
||||
extern ULONG MmTotalPagedPoolQuota;
|
||||
extern ULONG MmTotalNonPagedPoolQuota;
|
||||
extern PFN_NUMBER MiFreeSwapPages;
|
||||
extern PFN_NUMBER MiUsedSwapPages;
|
||||
extern SIZE_T MmPagedPoolSize;
|
||||
extern SIZE_T MmTotalPagedPoolQuota;
|
||||
extern SIZE_T MmTotalNonPagedPoolQuota;
|
||||
extern PHYSICAL_ADDRESS MmSharedDataPagePhysicalAddress;
|
||||
extern ULONG MmNumberOfPhysicalPages;
|
||||
extern PFN_NUMBER MmNumberOfPhysicalPages;
|
||||
extern UCHAR MmDisablePagingExecutive;
|
||||
extern ULONG MmLowestPhysicalPage;
|
||||
extern ULONG MmHighestPhysicalPage;
|
||||
extern ULONG MmAvailablePages;
|
||||
extern PFN_NUMBER MmLowestPhysicalPage;
|
||||
extern PFN_NUMBER MmHighestPhysicalPage;
|
||||
extern PFN_NUMBER MmAvailablePages;
|
||||
extern PFN_NUMBER MmResidentAvailablePages;
|
||||
|
||||
extern PVOID MmPagedPoolBase;
|
||||
extern ULONG MmPagedPoolSize;
|
||||
extern SIZE_T MmPagedPoolSize;
|
||||
|
||||
extern PMEMORY_ALLOCATION_DESCRIPTOR MiFreeDescriptor;
|
||||
extern MEMORY_ALLOCATION_DESCRIPTOR MiFreeDescriptorOrg;
|
||||
|
@ -874,7 +874,7 @@ MmQueryAnonMem(
|
|||
PMEMORY_AREA MemoryArea,
|
||||
PVOID Address,
|
||||
PMEMORY_BASIC_INFORMATION Info,
|
||||
PULONG ResultLength
|
||||
PSIZE_T ResultLength
|
||||
);
|
||||
|
||||
VOID
|
||||
|
@ -1548,7 +1548,7 @@ MmQuerySectionView(
|
|||
PMEMORY_AREA MemoryArea,
|
||||
PVOID Address,
|
||||
PMEMORY_BASIC_INFORMATION Info,
|
||||
PULONG ResultLength
|
||||
PSIZE_T ResultLength
|
||||
);
|
||||
|
||||
NTSTATUS
|
||||
|
@ -1641,8 +1641,8 @@ MiQueryVirtualMemory(
|
|||
IN PVOID Address,
|
||||
IN MEMORY_INFORMATION_CLASS VirtualMemoryInformationClass,
|
||||
OUT PVOID VirtualMemoryInformation,
|
||||
IN ULONG Length,
|
||||
OUT PULONG ResultLength
|
||||
IN SIZE_T Length,
|
||||
OUT PSIZE_T ResultLength
|
||||
);
|
||||
|
||||
/* sysldr.c ******************************************************************/
|
||||
|
|
|
@ -92,7 +92,7 @@ IopFreeMiniPacket(PIOP_MINI_COMPLETION_PACKET Packet)
|
|||
}
|
||||
|
||||
/* The free was within dhe Depth */
|
||||
InterlockedPushEntrySList(&List->L.ListHead, (PSINGLE_LIST_ENTRY)Packet);
|
||||
InterlockedPushEntrySList(&List->L.ListHead, (PSLIST_ENTRY)Packet);
|
||||
}
|
||||
|
||||
VOID
|
||||
|
|
|
@ -1557,7 +1557,7 @@ IoFreeIrp(IN PIRP Irp)
|
|||
if (Irp)
|
||||
{
|
||||
InterlockedPushEntrySList(&List->L.ListHead,
|
||||
(PSINGLE_LIST_ENTRY)Irp);
|
||||
(PSLIST_ENTRY)Irp);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -232,7 +232,7 @@ KeRosCaptureUserStackBackTrace(IN ULONG FramesToSkip,
|
|||
|
||||
VOID
|
||||
FASTCALL
|
||||
KeRosDumpStackFrameArray(IN PULONG Frames,
|
||||
KeRosDumpStackFrameArray(IN PULONG_PTR Frames,
|
||||
IN ULONG FrameCount)
|
||||
{
|
||||
ULONG i, Addr;
|
||||
|
@ -271,13 +271,13 @@ KeRosDumpStackFrameArray(IN PULONG Frames,
|
|||
{
|
||||
/* Print out the module name */
|
||||
Addr -= (ULONG_PTR)LdrEntry->DllBase;
|
||||
DbgPrint("<%wZ: %x>\n", &LdrEntry->FullDllName, Addr);
|
||||
DbgPrint("<%wZ: %p>", &LdrEntry->FullDllName, (PVOID)Addr);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Print only the address */
|
||||
DbgPrint("<%x>\n", Addr);
|
||||
DbgPrint("<%p>", (PVOID)Addr);
|
||||
}
|
||||
|
||||
/* Go to the next frame */
|
||||
|
@ -287,10 +287,10 @@ KeRosDumpStackFrameArray(IN PULONG Frames,
|
|||
|
||||
VOID
|
||||
NTAPI
|
||||
KeRosDumpStackFrames(IN PULONG Frame OPTIONAL,
|
||||
KeRosDumpStackFrames(IN PULONG_PTR Frame OPTIONAL,
|
||||
IN ULONG FrameCount OPTIONAL)
|
||||
{
|
||||
ULONG Frames[32];
|
||||
ULONG_PTR Frames[32];
|
||||
ULONG RealFrameCount;
|
||||
|
||||
/* If the caller didn't ask, assume 32 frames */
|
||||
|
@ -1410,7 +1410,7 @@ KeRegisterNmiCallback(IN PNMI_CALLBACK CallbackRoutine,
|
|||
//
|
||||
KiAcquireNmiListLock(&OldIrql);
|
||||
NmiData->Next = KiNmiCallbackListHead;
|
||||
Next = InterlockedCompareExchangePointer(&KiNmiCallbackListHead,
|
||||
Next = InterlockedCompareExchangePointer((PVOID*)&KiNmiCallbackListHead,
|
||||
NmiData,
|
||||
NmiData->Next);
|
||||
ASSERT(Next == NmiData->Next);
|
||||
|
|
|
@ -379,24 +379,24 @@ extern LIST_ENTRY MiLargePageDriverList;
|
|||
extern BOOLEAN MiLargePageAllDrivers;
|
||||
extern ULONG MmVerifyDriverBufferLength;
|
||||
extern ULONG MmLargePageDriverBufferLength;
|
||||
extern ULONG MmSizeOfNonPagedPoolInBytes;
|
||||
extern ULONG MmMaximumNonPagedPoolInBytes;
|
||||
extern SIZE_T MmSizeOfNonPagedPoolInBytes;
|
||||
extern SIZE_T MmMaximumNonPagedPoolInBytes;
|
||||
extern PFN_NUMBER MmMaximumNonPagedPoolInPages;
|
||||
extern PFN_NUMBER MmSizeOfPagedPoolInPages;
|
||||
extern PVOID MmNonPagedSystemStart;
|
||||
extern PVOID MmNonPagedPoolStart;
|
||||
extern PVOID MmNonPagedPoolExpansionStart;
|
||||
extern PVOID MmNonPagedPoolEnd;
|
||||
extern ULONG MmSizeOfPagedPoolInBytes;
|
||||
extern SIZE_T MmSizeOfPagedPoolInBytes;
|
||||
extern PVOID MmPagedPoolStart;
|
||||
extern PVOID MmPagedPoolEnd;
|
||||
extern PVOID MmSessionBase;
|
||||
extern ULONG MmSessionSize;
|
||||
extern SIZE_T MmSessionSize;
|
||||
extern PMMPTE MmFirstReservedMappingPte, MmLastReservedMappingPte;
|
||||
extern PMMPTE MiFirstReservedZeroingPte;
|
||||
extern MI_PFN_CACHE_ATTRIBUTE MiPlatformCacheAttributes[2][MmMaximumCacheType];
|
||||
extern PPHYSICAL_MEMORY_DESCRIPTOR MmPhysicalMemoryBlock;
|
||||
extern ULONG MmBootImageSize;
|
||||
extern SIZE_T MmBootImageSize;
|
||||
extern PMMPTE MmSystemPtesStart[MaximumPtePoolTypes];
|
||||
extern PMMPTE MmSystemPtesEnd[MaximumPtePoolTypes];
|
||||
extern PMEMORY_ALLOCATION_DESCRIPTOR MxFreeDescriptor;
|
||||
|
@ -409,14 +409,14 @@ extern PVOID MmPagedPoolStart;
|
|||
extern PVOID MmPagedPoolEnd;
|
||||
extern PVOID MmNonPagedSystemStart;
|
||||
extern PVOID MiSystemViewStart;
|
||||
extern ULONG MmSystemViewSize;
|
||||
extern SIZE_T MmSystemViewSize;
|
||||
extern PVOID MmSessionBase;
|
||||
extern PVOID MiSessionSpaceEnd;
|
||||
extern PMMPTE MiSessionImagePteStart;
|
||||
extern PMMPTE MiSessionImagePteEnd;
|
||||
extern PMMPTE MiSessionBasePte;
|
||||
extern PMMPTE MiSessionLastPte;
|
||||
extern ULONG MmSizeOfPagedPoolInBytes;
|
||||
extern SIZE_T MmSizeOfPagedPoolInBytes;
|
||||
extern PMMPTE MmSystemPagePtes;
|
||||
extern PVOID MmSystemCacheStart;
|
||||
extern PVOID MmSystemCacheEnd;
|
||||
|
@ -426,9 +426,9 @@ extern ULONG_PTR MmSubsectionBase;
|
|||
extern ULONG MmSpecialPoolTag;
|
||||
extern PVOID MmHyperSpaceEnd;
|
||||
extern PMMWSL MmSystemCacheWorkingSetList;
|
||||
extern ULONG MmMinimumNonPagedPoolSize;
|
||||
extern SIZE_T MmMinimumNonPagedPoolSize;
|
||||
extern ULONG MmMinAdditionNonPagedPoolPerMb;
|
||||
extern ULONG MmDefaultMaximumNonPagedPool;
|
||||
extern SIZE_T MmDefaultMaximumNonPagedPool;
|
||||
extern ULONG MmMaxAdditionNonPagedPoolPerMb;
|
||||
extern ULONG MmSecondaryColors;
|
||||
extern ULONG MmSecondaryColorMask;
|
||||
|
|
|
@ -23,8 +23,8 @@
|
|||
// figure out the most appropriate values.
|
||||
//
|
||||
ULONG MmMaximumNonPagedPoolPercent;
|
||||
ULONG MmSizeOfNonPagedPoolInBytes;
|
||||
ULONG MmMaximumNonPagedPoolInBytes;
|
||||
SIZE_T MmSizeOfNonPagedPoolInBytes;
|
||||
SIZE_T MmMaximumNonPagedPoolInBytes;
|
||||
|
||||
/* Some of the same values, in pages */
|
||||
PFN_NUMBER MmMaximumNonPagedPoolInPages;
|
||||
|
@ -36,9 +36,9 @@ PFN_NUMBER MmMaximumNonPagedPoolInPages;
|
|||
// They are described on http://support.microsoft.com/default.aspx/kb/126402/ja
|
||||
// along with the algorithm that uses them, which is implemented later below.
|
||||
//
|
||||
ULONG MmMinimumNonPagedPoolSize = 256 * 1024;
|
||||
SIZE_T MmMinimumNonPagedPoolSize = 256 * 1024;
|
||||
ULONG MmMinAdditionNonPagedPoolPerMb = 32 * 1024;
|
||||
ULONG MmDefaultMaximumNonPagedPool = 1024 * 1024;
|
||||
SIZE_T MmDefaultMaximumNonPagedPool = 1024 * 1024;
|
||||
ULONG MmMaxAdditionNonPagedPoolPerMb = 400 * 1024;
|
||||
|
||||
//
|
||||
|
@ -107,7 +107,7 @@ PVOID MmPagedPoolEnd;
|
|||
//
|
||||
// And this is its default size
|
||||
//
|
||||
ULONG MmSizeOfPagedPoolInBytes = MI_MIN_INIT_PAGED_POOLSIZE;
|
||||
SIZE_T MmSizeOfPagedPoolInBytes = MI_MIN_INIT_PAGED_POOLSIZE;
|
||||
PFN_NUMBER MmSizeOfPagedPoolInPages = MI_MIN_INIT_PAGED_POOLSIZE / PAGE_SIZE;
|
||||
|
||||
//
|
||||
|
@ -131,10 +131,10 @@ PVOID MiSessionViewStart; // 0xBE000000
|
|||
PVOID MiSessionPoolEnd; // 0xBE000000
|
||||
PVOID MiSessionPoolStart; // 0xBD000000
|
||||
PVOID MmSessionBase; // 0xBD000000
|
||||
ULONG MmSessionSize;
|
||||
ULONG MmSessionViewSize;
|
||||
ULONG MmSessionPoolSize;
|
||||
ULONG MmSessionImageSize;
|
||||
SIZE_T MmSessionSize;
|
||||
SIZE_T MmSessionViewSize;
|
||||
SIZE_T MmSessionPoolSize;
|
||||
SIZE_T MmSessionImageSize;
|
||||
|
||||
/*
|
||||
* These are the PTE addresses of the boundaries carved out above
|
||||
|
@ -151,7 +151,7 @@ PMMPTE MiSessionLastPte;
|
|||
// By default, it is a 16MB region.
|
||||
//
|
||||
PVOID MiSystemViewStart;
|
||||
ULONG MmSystemViewSize;
|
||||
SIZE_T MmSystemViewSize;
|
||||
|
||||
//
|
||||
// A copy of the system page directory (the page directory associated with the
|
||||
|
@ -175,13 +175,13 @@ PMMWSL MmSystemCacheWorkingSetList = MI_SYSTEM_CACHE_WS_START;
|
|||
// On systems with more than 32MB, this number is then doubled, and further
|
||||
// aligned up to a PDE boundary (4MB).
|
||||
//
|
||||
ULONG MmNumberOfSystemPtes;
|
||||
ULONG_PTR MmNumberOfSystemPtes;
|
||||
|
||||
//
|
||||
// This is how many pages the PFN database will take up
|
||||
// In Windows, this includes the Quark Color Table, but not in ARM³
|
||||
//
|
||||
ULONG MxPfnAllocation;
|
||||
PFN_NUMBER MxPfnAllocation;
|
||||
|
||||
//
|
||||
// Unlike the old ReactOS Memory Manager, ARM³ (and Windows) does not keep track
|
||||
|
@ -205,7 +205,7 @@ PPHYSICAL_MEMORY_DESCRIPTOR MmPhysicalMemoryBlock;
|
|||
//
|
||||
// This is where we keep track of the most basic physical layout markers
|
||||
//
|
||||
ULONG MmNumberOfPhysicalPages, MmHighestPhysicalPage, MmLowestPhysicalPage = -1;
|
||||
PFN_NUMBER MmNumberOfPhysicalPages, MmHighestPhysicalPage, MmLowestPhysicalPage = -1;
|
||||
|
||||
//
|
||||
// The total number of pages mapped by the boot loader, which include the kernel
|
||||
|
@ -215,13 +215,13 @@ ULONG MmNumberOfPhysicalPages, MmHighestPhysicalPage, MmLowestPhysicalPage = -1;
|
|||
//
|
||||
// This number is later aligned up to a PDE boundary.
|
||||
//
|
||||
ULONG MmBootImageSize;
|
||||
SIZE_T MmBootImageSize;
|
||||
|
||||
//
|
||||
// These three variables keep track of the core separation of address space that
|
||||
// exists between kernel mode and user mode.
|
||||
//
|
||||
ULONG MmUserProbeAddress;
|
||||
ULONG_PTR MmUserProbeAddress;
|
||||
PVOID MmHighestUserAddress;
|
||||
PVOID MmSystemRangeStart;
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
*/
|
||||
PVOID
|
||||
NTAPI
|
||||
MmAllocateNonCachedMemory(IN ULONG NumberOfBytes)
|
||||
MmAllocateNonCachedMemory(IN SIZE_T NumberOfBytes)
|
||||
{
|
||||
PFN_NUMBER PageCount, MdlPageCount, PageFrameIndex;
|
||||
PHYSICAL_ADDRESS LowAddress, HighAddress, SkipBytes;
|
||||
|
|
|
@ -513,7 +513,7 @@ MmCreatePeb(IN PEPROCESS Process,
|
|||
ImageConfigData = RtlImageDirectoryEntryToData(Peb->ImageBaseAddress,
|
||||
TRUE,
|
||||
IMAGE_DIRECTORY_ENTRY_LOAD_CONFIG,
|
||||
&ViewSize);
|
||||
(PULONG)&ViewSize);
|
||||
if (ImageConfigData)
|
||||
{
|
||||
//
|
||||
|
|
|
@ -883,7 +883,7 @@ NtWriteVirtualMemory(IN HANDLE ProcessHandle,
|
|||
KPROCESSOR_MODE PreviousMode = ExGetPreviousMode();
|
||||
PEPROCESS Process;
|
||||
NTSTATUS Status = STATUS_SUCCESS;
|
||||
ULONG BytesWritten = 0;
|
||||
SIZE_T BytesWritten = 0;
|
||||
PAGED_CODE();
|
||||
|
||||
//
|
||||
|
|
|
@ -718,10 +718,10 @@ NtAllocateVirtualMemory(IN HANDLE ProcessHandle,
|
|||
MemoryAreaLength = (ULONG_PTR)MemoryArea->EndingAddress -
|
||||
(ULONG_PTR)MemoryArea->StartingAddress;
|
||||
|
||||
if (((ULONG)BaseAddress + RegionSize) > (ULONG)MemoryArea->EndingAddress)
|
||||
if (((ULONG_PTR)BaseAddress + RegionSize) > (ULONG_PTR)MemoryArea->EndingAddress)
|
||||
{
|
||||
DPRINT("BaseAddress + RegionSize %x is larger than MemoryArea's EndingAddress %x\n",
|
||||
(ULONG)BaseAddress + RegionSize, MemoryArea->EndingAddress);
|
||||
(ULONG_PTR)BaseAddress + RegionSize, MemoryArea->EndingAddress);
|
||||
|
||||
MmUnlockAddressSpace(AddressSpace);
|
||||
ObDereferenceObject(Process);
|
||||
|
@ -1123,7 +1123,7 @@ NTSTATUS NTAPI
|
|||
MmQueryAnonMem(PMEMORY_AREA MemoryArea,
|
||||
PVOID Address,
|
||||
PMEMORY_BASIC_INFORMATION Info,
|
||||
PULONG ResultLength)
|
||||
PSIZE_T ResultLength)
|
||||
{
|
||||
PMM_REGION Region;
|
||||
PVOID RegionBase = NULL;
|
||||
|
|
|
@ -81,17 +81,17 @@ static ULONG MiPagingFileCount;
|
|||
ULONG MmNumberOfPagingFiles;
|
||||
|
||||
/* Number of pages that are available for swapping */
|
||||
ULONG MiFreeSwapPages;
|
||||
PFN_NUMBER MiFreeSwapPages;
|
||||
|
||||
/* Number of pages that have been allocated for swapping */
|
||||
ULONG MiUsedSwapPages;
|
||||
PFN_NUMBER MiUsedSwapPages;
|
||||
|
||||
BOOLEAN MmZeroPageFile;
|
||||
|
||||
/*
|
||||
* Number of pages that have been reserved for swapping but not yet allocated
|
||||
*/
|
||||
static ULONG MiReservedSwapPages;
|
||||
static PFN_NUMBER MiReservedSwapPages;
|
||||
|
||||
/*
|
||||
* Ratio between reserved and available swap pages, e.g. setting this to five
|
||||
|
|
|
@ -159,8 +159,8 @@ typedef struct _R_POOL
|
|||
R_POOL, *PR_POOL;
|
||||
|
||||
PVOID MmPagedPoolBase;
|
||||
ULONG MmPagedPoolSize;
|
||||
ULONG MmTotalPagedPoolQuota = 0; // TODO FIXME commented out until we use it
|
||||
SIZE_T MmPagedPoolSize;
|
||||
SIZE_T MmTotalPagedPoolQuota = 0; // TODO FIXME commented out until we use it
|
||||
static PR_POOL MmPagedPool = NULL;
|
||||
|
||||
/* FUNCTIONS*******************************************************************/
|
||||
|
|
|
@ -2083,7 +2083,7 @@ NTSTATUS NTAPI
|
|||
MmQuerySectionView(PMEMORY_AREA MemoryArea,
|
||||
PVOID Address,
|
||||
PMEMORY_BASIC_INFORMATION Info,
|
||||
PULONG ResultLength)
|
||||
PSIZE_T ResultLength)
|
||||
{
|
||||
PMM_REGION Region;
|
||||
PVOID RegionBaseAddress;
|
||||
|
|
Loading…
Reference in a new issue