Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2011-05-13 10:50:20 +0400
committerCorinna Vinschen <corinna@vinschen.de>2011-05-13 10:50:20 +0400
commitb4966f91396b337dc0ce1c1b9f7a95a62a64c84e (patch)
tree365a6474147588268479073cb199bb892f2a8fff /winsup/cygwin/ntdll.h
parent4fda5718319e0c66e6f4b017e722293a4516413d (diff)
* fhandler_process.cc (struct heap_info::heap): Convert base to
uintptr_t. Add heap_id, end, flags members. (heap_info::heap_vm_chunks): Rename from heaps. (heap_info::heap_info): Rearrange using RtlQueryProcessDebugInformation to get information of heap virtual memory blocks. Store heap id and flags, as well as end address of each block. (heap_info::fill_if_match): Check incoming base address against full address range of heap chunks. Convert flag values in extra heap information. (format_process_maps): Change order so that heap check is done before MEM_MAPPED check since there are shareable heaps. * ntdll.h (PDI_HEAP_BLOCKS): Define. (HEAP_FLAG_NOSERIALIZE): Define. (HEAP_FLAG_GROWABLE): Define. (HEAP_FLAG_EXCEPTIONS): Define. (HEAP_FLAG_NONDEFAULT): Define. (HEAP_FLAG_SHAREABLE): Define. (HEAP_FLAG_EXECUTABLE): Define. (HEAP_FLAG_DEBUGGED): Define. (struct _DEBUG_HEAP_ARRAY): Define. (struct _DEBUG_HEAP_BLOCK): Define.
Diffstat (limited to 'winsup/cygwin/ntdll.h')
-rw-r--r--winsup/cygwin/ntdll.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/winsup/cygwin/ntdll.h b/winsup/cygwin/ntdll.h
index df0ae29a3..cb4e6d962 100644
--- a/winsup/cygwin/ntdll.h
+++ b/winsup/cygwin/ntdll.h
@@ -63,6 +63,7 @@
#define PDI_MODULES 0x01
#define PDI_HEAPS 0x04
+#define PDI_HEAP_BLOCKS 0x10
#define LDRP_IMAGE_DLL 0x00000004
#define WSLE_PAGE_READONLY 0x001
#define WSLE_PAGE_EXECUTE 0x002
@@ -510,6 +511,15 @@ typedef struct _DEBUG_BUFFER
PVOID Reserved[9];
} DEBUG_BUFFER, *PDEBUG_BUFFER;
+/* Known debug heap flags */
+#define HEAP_FLAG_NOSERIALIZE 0x1
+#define HEAP_FLAG_GROWABLE 0x2
+#define HEAP_FLAG_EXCEPTIONS 0x4
+#define HEAP_FLAG_NONDEFAULT 0x1000
+#define HEAP_FLAG_SHAREABLE 0x8000
+#define HEAP_FLAG_EXECUTABLE 0x40000
+#define HEAP_FLAG_DEBUGGED 0x40000000
+
typedef struct _DEBUG_HEAP_INFORMATION
{
ULONG Base;
@@ -525,6 +535,20 @@ typedef struct _DEBUG_HEAP_INFORMATION
PVOID Blocks;
} DEBUG_HEAP_INFORMATION, *PDEBUG_HEAP_INFORMATION;
+typedef struct _DEBUG_HEAP_ARRAY
+{
+ ULONG Count;
+ DEBUG_HEAP_INFORMATION Heaps[1];
+} DEBUG_HEAP_ARRAY, *PDEBUG_HEAP_ARRAY;
+
+typedef struct _DEBUG_HEAP_BLOCK
+{
+ ULONG Size;
+ ULONG Flags;
+ ULONG Committed;
+ ULONG Address;
+} DEBUG_HEAP_BLOCK, *PDEBUG_HEAP_BLOCK;
+
typedef struct _DEBUG_MODULE_INFORMATION
{
ULONG Reserved[2];