Non-Addressable Range in Address SpaceLast reviewed: November 2, 1995Article ID: Q92764 |
The information in this article applies to:
SUMMARYIn Windows NT, each process has its own private address space. The process can use up to 2 gigabytes of virtual memory. This 2Gb is not necessarily contiguous. The system uses the other 2Gb. The user-mode addresses extend from 0x00010000 to 0x7FFF0000. The following ranges are reserved as non-address space to ensure that the process does not walk on system-owned memory
0x00000000 to 0x0000FFFF (first 64K of virtual space) 0x7FFF0000 to 0x7FFFFFFF (last 64K of user virtual space)These are effectively PAGE_NOACCESS ranges. Additionally, Win32 DLLs will reserve other specific address ranges. For more information, see the file COFFBASE.TXT that comes with the DDK.
MORE INFORMATIONThis range is not guaranteed to serve this purpose in the future. There could be good reasons in a future implementation to use these addresses. Code that is going to depend on this non-address range should verify its validity at run time with something like
BOOL IsFirst64kInvalid(void) { BOOL bFirst64kInvalid = FALSE; try { *(char *)0x0000FFFF; } except (EXCEPTION_EXECUTE_HANDLER) { if (EXCEPTION_ACCESS_VIOLATION == GetExceptionCode()) bFirst64kInvalid = TRUE; } return bFirst64kInvalid; } |
Additional reference words: 3.10 3.50
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |