VirtualBox

Changeset 52941 in vbox for trunk/include/iprt


Ignore:
Timestamp:
Oct 3, 2014 7:58:01 PM (10 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
96381
Message:

Use our own heap in the hope that we can use it before ntdll is really initialized. Fixed RtlExitProcess issue. More early import work.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/iprt/nt/nt.h

    r52940 r52941  
    19261926NTSYSAPI VOID NTAPI     LdrInitializeThunk(PVOID, PVOID, PVOID);
    19271927NTSYSAPI NTSTATUS NTAPI RtlExpandEnvironmentStrings_U(PVOID, PUNICODE_STRING, PUNICODE_STRING, PULONG);
    1928 NTSYSAPI VOID NTAPI     RtlExitProcess(NTSTATUS rcExitCode);
    1929 NTSYSAPI VOID NTAPI     RtlExitThread(NTSTATUS rcExitCode);
     1928NTSYSAPI VOID NTAPI     RtlExitUserProcess(NTSTATUS rcExitCode); /**< Vista and later. */
     1929NTSYSAPI VOID NTAPI     RtlExitUserThread(NTSTATUS rcExitCode);
    19301930NTSYSAPI NTSTATUS NTAPI RtlDosApplyFileIsolationRedirection_Ustr(IN ULONG fFlags,
    19311931                                                                 IN PCUNICODE_STRING pOrgName,
     
    19371937                                                                 IN PSIZE_T pcbFilename OPTIONAL,
    19381938                                                                 IN PSIZE_T pcbNeeded OPTIONAL);
     1939
    19391940# ifdef IPRT_NT_USE_WINTERNL
     1941typedef NTSTATUS NTAPI RTL_HEAP_COMMIT_ROUTINE(PVOID, PVOID *, PSIZE_T);
     1942typedef RTL_HEAP_COMMIT_ROUTINE *PRTL_HEAP_COMMIT_ROUTINE;
     1943typedef struct _RTL_HEAP_PARAMETERS
     1944{
     1945    ULONG   Length;
     1946    SIZE_T  SegmentReserve;
     1947    SIZE_T  SegmentCommit;
     1948    SIZE_T  DeCommitFreeBlockThreshold;
     1949    SIZE_T  DeCommitTotalFreeThreshold;
     1950    SIZE_T  MaximumAllocationSize;
     1951    SIZE_T  VirtualMemoryThreshold;
     1952    SIZE_T  InitialCommit;
     1953    SIZE_T  InitialReserve;
     1954    PRTL_HEAP_COMMIT_ROUTINE  CommitRoutine;
     1955    SIZE_T  Reserved[2];
     1956} RTL_HEAP_PARAMETERS;
     1957typedef RTL_HEAP_PARAMETERS *PRTL_HEAP_PARAMETERS;
     1958NTSYSAPI PVOID NTAPI RtlCreateHeap(ULONG fFlags, PVOID pvHeapBase, SIZE_T cbReserve, SIZE_T cbCommit, PVOID pvLock,
     1959                                   PRTL_HEAP_PARAMETERS pParameters);
     1960/** @name Heap flags (for RtlCreateHeap).
     1961 * @{ */
     1962/*#  define HEAP_NO_SERIALIZE             UINT32_C(0x00000001)
     1963#  define HEAP_GROWABLE                 UINT32_C(0x00000002)
     1964#  define HEAP_GENERATE_EXCEPTIONS      UINT32_C(0x00000004)
     1965#  define HEAP_ZERO_MEMORY              UINT32_C(0x00000008)
     1966#  define HEAP_REALLOC_IN_PLACE_ONLY    UINT32_C(0x00000010)
     1967#  define HEAP_TAIL_CHECKING_ENABLED    UINT32_C(0x00000020)
     1968#  define HEAP_FREE_CHECKING_ENABLED    UINT32_C(0x00000040)
     1969#  define HEAP_DISABLE_COALESCE_ON_FREE UINT32_C(0x00000080)*/
     1970#  define HEAP_SETTABLE_USER_VALUE      UINT32_C(0x00000100)
     1971#  define HEAP_SETTABLE_USER_FLAG1      UINT32_C(0x00000200)
     1972#  define HEAP_SETTABLE_USER_FLAG2      UINT32_C(0x00000400)
     1973#  define HEAP_SETTABLE_USER_FLAG3      UINT32_C(0x00000800)
     1974#  define HEAP_SETTABLE_USER_FLAGS      UINT32_C(0x00000e00)
     1975#  define HEAP_CLASS_0                  UINT32_C(0x00000000)
     1976#  define HEAP_CLASS_1                  UINT32_C(0x00001000)
     1977#  define HEAP_CLASS_2                  UINT32_C(0x00002000)
     1978#  define HEAP_CLASS_3                  UINT32_C(0x00003000)
     1979#  define HEAP_CLASS_4                  UINT32_C(0x00004000)
     1980#  define HEAP_CLASS_5                  UINT32_C(0x00005000)
     1981#  define HEAP_CLASS_6                  UINT32_C(0x00006000)
     1982#  define HEAP_CLASS_7                  UINT32_C(0x00007000)
     1983#  define HEAP_CLASS_8                  UINT32_C(0x00008000)
     1984#  define HEAP_CLASS_MASK               UINT32_C(0x0000f000)
     1985# endif
     1986# define HEAP_CLASS_PROCESS             HEAP_CLASS_0
     1987# define HEAP_CLASS_PRIVATE             HEAP_CLASS_1
     1988# define HEAP_CLASS_KERNEL              HEAP_CLASS_2
     1989# define HEAP_CLASS_GDI                 HEAP_CLASS_3
     1990# define HEAP_CLASS_USER                HEAP_CLASS_4
     1991# define HEAP_CLASS_CONSOLE             HEAP_CLASS_5
     1992# define HEAP_CLASS_USER_DESKTOP        HEAP_CLASS_6
     1993# define HEAP_CLASS_CSRSS_SHARED        HEAP_CLASS_7
     1994# define HEAP_CLASS_CSRSS_PORT          HEAP_CLASS_8
     1995# ifdef IPRT_NT_USE_WINTERNL
     1996/*#  define HEAP_CREATE_ALIGN_16          UINT32_C(0x00010000)
     1997#  define HEAP_CREATE_ENABLE_TRACING    UINT32_C(0x00020000)
     1998#  define HEAP_CREATE_ENABLE_EXECUTE    UINT32_C(0x00040000)*/
     1999#  define HEAP_CREATE_VALID_MASK        UINT32_C(0x0007f0ff)
     2000# endif /* IPRT_NT_USE_WINTERNL */
     2001/** @} */
     2002# ifdef IPRT_NT_USE_WINTERNL
     2003/** @name Heap tagging constants
     2004 * @{ */
     2005#  define HEAP_GLOBAL_TAG               UINT32_C(0x00000800)
     2006/*#  define HEAP_MAXIMUM_TAG              UINT32_C(0x00000fff)
     2007#  define HEAP_PSEUDO_TAG_FLAG          UINT32_C(0x00008000)
     2008#  define HEAP_TAG_SHIFT                18 */
     2009#  define HEAP_TAG_MASK                 (HEAP_MAXIMUM_TAG << HEAP_TAG_SHIFT)
     2010/** @}  */
    19402011NTSYSAPI PVOID NTAPI    RtlAllocateHeap(HANDLE hHeap, ULONG fFlags, SIZE_T cb);
    19412012NTSYSAPI PVOID NTAPI    RtlReAllocateHeap(HANDLE hHeap, ULONG fFlags, PVOID pvOld, SIZE_T cbNew);
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette