[RTL/HEAP]
[reactos.git] / reactos / lib / rtl / heap.h
index 26ba0e7..f00a8da 100644 (file)
@@ -182,6 +182,19 @@ typedef struct _HEAP_TUNING_PARAMETERS
     ULONG MaxPreCommittThreshold;
 } HEAP_TUNING_PARAMETERS, *PHEAP_TUNING_PARAMETERS;
 
+typedef struct _HEAP_LIST_LOOKUP
+{
+    struct _HEAP_LIST_LOOKUP *ExtendedLookup;
+    ULONG ArraySize;
+    ULONG ExtraItem;
+    ULONG ItemCount;
+    ULONG OutOfRangeItems;
+    ULONG BaseIndex;
+    PLIST_ENTRY ListHead;
+    PULONG ListsInUseUlong;
+    PLIST_ENTRY *ListHints;
+} HEAP_LIST_LOOKUP, *PHEAP_LIST_LOOKUP;
+
 typedef struct _HEAP
 {
     HEAP_ENTRY Entry;
@@ -229,10 +242,11 @@ typedef struct _HEAP
     struct _HEAP_SEGMENT *Segments[HEAP_SEGMENTS]; //FIXME: non-Vista
     USHORT AllocatorBackTraceIndex;
     ULONG NonDedicatedListLength;
-    PVOID BlocksIndex;
+    PVOID BlocksIndex; // HEAP_LIST_LOOKUP
     PVOID UCRIndex;
     PHEAP_PSEUDO_TAG_ENTRY PseudoTagEntries;
     LIST_ENTRY FreeLists[HEAP_FREELISTS]; //FIXME: non-Vista
+    //LIST_ENTRY FreeLists;
     union
     {
         ULONG FreeListsInUseUlong[HEAP_FREELISTS / (sizeof(ULONG) * 8)]; //FIXME: non-Vista
@@ -322,6 +336,15 @@ RtlpCoalesceFreeBlocks (PHEAP Heap,
 PHEAP_ENTRY_EXTRA NTAPI
 RtlpGetExtraStuffPointer(PHEAP_ENTRY HeapEntry);
 
+BOOLEAN NTAPI
+RtlpValidateHeap(PHEAP Heap, BOOLEAN ForceValidation);
+
+BOOLEAN NTAPI
+RtlpValidateHeapEntry(PHEAP Heap, PHEAP_ENTRY HeapEntry);
+
+BOOLEAN NTAPI
+RtlpValidateHeapHeaders(PHEAP Heap, BOOLEAN Recalculate);
+
 /* heapdbg.c */
 HANDLE NTAPI
 RtlDebugCreateHeap(ULONG Flags,
@@ -331,7 +354,7 @@ RtlDebugCreateHeap(ULONG Flags,
                    PVOID Lock,
                    PRTL_HEAP_PARAMETERS Parameters);
 
-HANDLE NTAPI
+BOOLEAN NTAPI
 RtlDebugDestroyHeap(HANDLE HeapPtr);
 
 PVOID NTAPI
@@ -376,6 +399,8 @@ RtlDebugSizeHeap(HANDLE HeapPtr,
                  ULONG Flags,
                  PVOID Ptr);
 
+/* heappage.c */
+
 HANDLE NTAPI
 RtlpPageHeapCreate(ULONG Flags,
                    PVOID Addr,
@@ -384,4 +409,55 @@ RtlpPageHeapCreate(ULONG Flags,
                    PVOID Lock,
                    PRTL_HEAP_PARAMETERS Parameters);
 
+PVOID NTAPI
+RtlpPageHeapDestroy(HANDLE HeapPtr);
+
+PVOID NTAPI
+RtlpPageHeapAllocate(IN PVOID HeapPtr,
+                     IN ULONG Flags,
+                     IN SIZE_T Size);
+
+BOOLEAN NTAPI
+RtlpPageHeapFree(HANDLE HeapPtr,
+                 ULONG Flags,
+                 PVOID Ptr);
+
+PVOID NTAPI
+RtlpPageHeapReAllocate(HANDLE HeapPtr,
+                       ULONG Flags,
+                       PVOID Ptr,
+                       SIZE_T Size);
+
+BOOLEAN NTAPI
+RtlpPageHeapGetUserInfo(PVOID HeapHandle,
+                        ULONG Flags,
+                        PVOID BaseAddress,
+                        PVOID *UserValue,
+                        PULONG UserFlags);
+
+BOOLEAN NTAPI
+RtlpPageHeapSetUserValue(PVOID HeapHandle,
+                         ULONG Flags,
+                         PVOID BaseAddress,
+                         PVOID UserValue);
+
+BOOLEAN
+NTAPI
+RtlpPageHeapSetUserFlags(PVOID HeapHandle,
+                         ULONG Flags,
+                         PVOID BaseAddress,
+                         ULONG UserFlagsReset,
+                         ULONG UserFlagsSet);
+
+BOOLEAN
+NTAPI
+RtlpDebugPageHeapValidate(PVOID HeapPtr,
+                          ULONG Flags,
+                          PVOID Block);
+
+SIZE_T NTAPI
+RtlpPageHeapSize(HANDLE HeapPtr,
+                 ULONG Flags,
+                 PVOID Ptr);
+
 #endif