网上找到的,对 Windows Heap 有详细的定义。

 // file winheap.h
typedef void VOID;
typedef unsigned __int8 UINT8;
typedef unsigned __int16 UINT16;
typedef __int32 LONG32;
typedef unsigned __int32 ULONG32;
typedef unsigned __int64 UINT64; // pseudo struct, for the PEB heap list
struct HEAPTABLE {
struct _HEAP *list[];
}; struct _LIST_ENTRY {
struct _LIST_ENTRY *FLink;
struct _LIST_ENTRY *BLink;
}; union _SLIST_HEADER {
struct _LIST_ENTRY le;
}; typedef struct _HEAP_ENTRY // 7 elements, 0x8 bytes (sizeof)
{
// union // 2 elements, 0x4 bytes (sizeof)
// {
// struct // 2 elements, 0x4 bytes (sizeof)
// {
/*0x000*/ UINT16 Size;
/*0x002*/ UINT16 PreviousSize;
// };
///*0x000*/ VOID* SubSegmentCode;
// };
/*0x004*/ UINT8 SmallTagIndex;
/*0x005*/ UINT8 Flags;
/*0x006*/ UINT8 UnusedBytes;
/*0x007*/ UINT8 SegmentIndex;
}HEAP_ENTRY, *PHEAP_ENTRY; typedef struct _HEAP // 36 elements, 0x588 bytes (sizeof)
{
/*0x000*/ struct _HEAP_ENTRY Entry; // 7 elements, 0x8 bytes (sizeof)
/*0x008*/ ULONG32 Signature;
/*0x00C*/ ULONG32 Flags;
/*0x010*/ ULONG32 ForceFlags;
/*0x014*/ ULONG32 VirtualMemoryThreshold;
/*0x018*/ ULONG32 SegmentReserve;
/*0x01C*/ ULONG32 SegmentCommit;
/*0x020*/ ULONG32 DeCommitFreeBlockThreshold;
/*0x024*/ ULONG32 DeCommitTotalFreeThreshold;
/*0x028*/ ULONG32 TotalFreeSize;
/*0x02C*/ ULONG32 MaximumAllocationSize;
/*0x030*/ UINT16 ProcessHeapsListIndex;
/*0x032*/ UINT16 HeaderValidateLength;
/*0x034*/ VOID* HeaderValidateCopy;
/*0x038*/ UINT16 NextAvailableTagIndex;
/*0x03A*/ UINT16 MaximumTagIndex;
/*0x03C*/ struct _HEAP_TAG_ENTRY* TagEntries;
/*0x040*/ struct _HEAP_UCR_SEGMENT* UCRSegments;
/*0x044*/ struct _HEAP_UNCOMMMTTED_RANGE* UnusedUnCommittedRanges;
/*0x048*/ ULONG32 AlignRound;
/*0x04C*/ ULONG32 AlignMask;
/*0x050*/ struct _LIST_ENTRY VirtualAllocdBlocks; // 2 elements, 0x8 bytes (sizeof)
/*0x058*/ struct _HEAP_SEGMENT* Segments[];
union // 2 elements, 0x10 bytes (sizeof)
{
/*0x158*/ ULONG32 FreeListsInUseUlong[];
/*0x158*/ UINT8 FreeListsInUseBytes[];
}u;
union // 2 elements, 0x2 bytes (sizeof)
{
/*0x168*/ UINT16 FreeListsInUseTerminate;
/*0x168*/ UINT16 DecommitCount;
}u2;
/*0x16A*/ UINT16 AllocatorBackTraceIndex;
/*0x16C*/ ULONG32 NonDedicatedListLength;
/*0x170*/ VOID* LargeBlocksIndex;
/*0x174*/ struct _HEAP_PSEUDO_TAG_ENTRY* PseudoTagEntries;
/*0x178*/ struct _LIST_ENTRY FreeLists[128];
/*0x578*/ struct _HEAP_LOCK* LockVariable;
///*0x57C*/ FUNCT_0049_0C5F_CommitRoutine* CommitRoutine;
/*0x57C*/ VOID* CommitRoutine;
/*0x580*/ VOID* FrontEndHeap;
/*0x584*/ UINT16 FrontHeapLockCount;
/*0x586*/ UINT8 FrontEndHeapType;
/*0x587*/ UINT8 LastSegmentIndex;
}HEAP, *PHEAP; typedef struct _HEAP_UNCOMMMTTED_RANGE // 4 elements, 0x10 bytes (sizeof)
{
/*0x000*/ struct _HEAP_UNCOMMMTTED_RANGE* Next;
/*0x004*/ ULONG32 Address;
/*0x008*/ ULONG32 Size;
/*0x00C*/ ULONG32 filler;
}HEAP_UNCOMMMTTED_RANGE, *PHEAP_UNCOMMMTTED_RANGE; typedef struct _HEAP_ENTRY_EXTRA // 4 elements, 0x8 bytes (sizeof)
{
union // 2 elements, 0x8 bytes (sizeof)
{
struct // 3 elements, 0x8 bytes (sizeof)
{
/*0x000*/ UINT16 AllocatorBackTraceIndex;
/*0x002*/ UINT16 TagIndex;
/*0x004*/ ULONG32 Settable;
};
/*0x000*/ UINT64 ZeroInit;
};
}HEAP_ENTRY_EXTRA, *PHEAP_ENTRY_EXTRA; typedef struct _HEAP_VIRTUAL_ALLOC_ENTRY // 5 elements, 0x20 bytes (sizeof)
{
/*0x000*/ struct _LIST_ENTRY Entry; // 2 elements, 0x8 bytes (sizeof)
/*0x008*/ struct _HEAP_ENTRY_EXTRA ExtraStuff; // 4 elements, 0x8 bytes (sizeof)
/*0x010*/ ULONG32 CommitSize;
/*0x014*/ ULONG32 ReserveSize;
/*0x018*/ struct _HEAP_ENTRY BusyBlock; // 7 elements, 0x8 bytes (sizeof)
}HEAP_VIRTUAL_ALLOC_ENTRY, *PHEAP_VIRTUAL_ALLOC_ENTRY; typedef struct _HEAP_FREE_ENTRY // 8 elements, 0x10 bytes (sizeof)
{
union // 2 elements, 0x4 bytes (sizeof)
{
struct // 2 elements, 0x4 bytes (sizeof)
{
/*0x000*/ UINT16 Size;
/*0x002*/ UINT16 PreviousSize;
};
/*0x000*/ VOID* SubSegmentCode;
};
/*0x004*/ UINT8 SmallTagIndex;
/*0x005*/ UINT8 Flags;
/*0x006*/ UINT8 UnusedBytes;
/*0x007*/ UINT8 SegmentIndex;
/*0x008*/ struct _LIST_ENTRY FreeList; // 2 elements, 0x8 bytes (sizeof)
}HEAP_FREE_ENTRY, *PHEAP_FREE_ENTRY; typedef struct _HEAP_LOOKASIDE // 10 elements, 0x30 bytes (sizeof)
{
/*0x000*/ union _SLIST_HEADER ListHead; // 4 elements, 0x8 bytes (sizeof)
/*0x008*/ UINT16 Depth;
/*0x00A*/ UINT16 MaximumDepth;
/*0x00C*/ ULONG32 TotalAllocates;
/*0x010*/ ULONG32 AllocateMisses;
/*0x014*/ ULONG32 TotalFrees;
/*0x018*/ ULONG32 FreeMisses;
/*0x01C*/ ULONG32 LastTotalAllocates;
/*0x020*/ ULONG32 LastAllocateMisses;
/*0x024*/ ULONG32 Counters[];
/*0x02C*/ UINT8 _PADDING0_[0x4];
}HEAP_LOOKASIDE, *PHEAP_LOOKASIDE; struct FRONTEND1 {
struct _HEAP_LOOKASIDE l[];
}; typedef struct _HEAP_SEGMENT // 15 elements, 0x3C bytes (sizeof)
{
/*0x000*/ struct _HEAP_ENTRY Entry; // 7 elements, 0x8 bytes (sizeof)
/*0x008*/ ULONG32 Signature;
/*0x00C*/ ULONG32 Flags;
/*0x010*/ struct _HEAP* Heap;
/*0x014*/ ULONG32 LargestUnCommittedRange;
/*0x018*/ VOID* BaseAddress;
/*0x01C*/ ULONG32 NumberOfPages;
/*0x020*/ struct _HEAP_ENTRY* FirstEntry;
/*0x024*/ struct _HEAP_ENTRY* LastValidEntry;
/*0x028*/ ULONG32 NumberOfUnCommittedPages;
/*0x02C*/ ULONG32 NumberOfUnCommittedRanges;
/*0x030*/ struct _HEAP_UNCOMMMTTED_RANGE* UnCommittedRanges;
/*0x034*/ UINT16 AllocatorBackTraceIndex;
/*0x036*/ UINT16 Reserved;
/*0x038*/ struct _HEAP_ENTRY* LastEntryInSegment;
}HEAP_SEGMENT, *PHEAP_SEGMENT;

WinHeap.H的更多相关文章

  1. OD: Heap Overflow (XP SP2 - 2003) & DWORD SHOOT via Chunk Resize

    微软在堆中也增加了一些安全校验操作,使得原本是不容易的堆溢出变得困难重重: * PEB Random:在 Windows XP SP2 之后,微软不再使用固定的 PEB 基址 0x7FFDF000,而 ...

  2. APUE中fcntl.h的使用及O_SYNC在Mac与Ubuntu下的测试

    此部分测试涉及到APUE V3中,第三章的图3-12到图3-14. 通过fcntl.h提供的功能,修改fd的文件属性,本处增加O_SYNC功能,并测试其效果. 本文涉及代码: tree ch3 ch3 ...

  3. 关于apue.3e中apue.h的使用

    关于apue.3e中apue.h的使用 近来要学一遍APUE第三版,并于此开博做为记录. 先下载源文件: # url: http://http//www.apuebook.com/code3e.htm ...

  4. YYModel 源码解读(二)之NSObject+YYModel.h (1)

    本篇文章主要介绍 _YYModelPropertyMeta 前边的内容 首先先解释一下前边的辅助函数和枚举变量,在写一个功能的时候,这些辅助的东西可能不是一开始就能想出来的,应该是在后续的编码过程中 ...

  5. YYModel 源码解读(一)之YYModel.h

    #if __has_include(<YYModel/YYModel.h>) FOUNDATION_EXPORT double YYModelVersionNumber; FOUNDATI ...

  6. error RC1015: cannot open include file 'afxres.h' 解决办法

    在为WindowsPhone8程序添加本地化的过程中遇到这个问题: 问题原因就是afxres.h文件缺失,下载它,放到VS安装目录下的VS\include目录下就可以了(选择目录的时候注意对应对版本) ...

  7. afxcomctl32.h与afxcomctl32.inl报错

    afxcomctl32.h与afxcomctl32.inl报错 编译公司一个几年前的老项目,是从VC6.0升级到VS2005的. 1.编译时报缺少头文件,于是附件包含目录,于是出现了以下报错: 1&g ...

  8. C标准头文件<math.h>

    定义域错误可以理解为超出了函数的适用范围,如果发生了定义域错误,设errno为EDOM 如果结果不能表示为double值,则发生值域错误,如果结果上溢,则函数返回HUGE_VAL的值,设errno为E ...

  9. C标准头文件<ctype.h>

    主要包括了一些字符识别和转换函数 字符判断 isalnum() //函数原型 #include<ctype.h> int isalum(int c); 功能:如果输入的字符是字母(alph ...

随机推荐

  1. (转载)用css来实现十字的布局

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...

  2. hadoop+eclipse集群搭建及测试

    前段时间搭了下hadoop,每次都会碰到很多问题,也没整理过,每次搜索都麻烦,现在整理下 一.准备工作 1.准备俩计算机,安装linux系统,分别装好jdk(虚拟机操作一样) nano /etc/ho ...

  3. PHP图形计算器(计算三角形矩形周长面积)

    运用PHP面向对象的知识设计一个图形计算器,同时也运用到了抽象类知识,这个计算器可以计算三角形的周长和面积以及矩形的周长和面积.本图形计算器有4个页面:1.PHP图形计算器主页index.php;   ...

  4. UVA - 11346 Probability (概率)

    Description Probability Time Limit: 1 sec  Memory Limit: 16MB Consider rectangular coordinate system ...

  5. [转]解读ASP.NET 5 & MVC6系列(7):依赖注入

    本文转自:http://www.cnblogs.com/TomXu/p/4496440.html 在前面的章节(Middleware章节)中,我们提到了依赖注入功能(Dependency Inject ...

  6. Facebook 开源 AI 所使用的硬件平台 'Big Sur'

    Facebook 开源 AI 所使用的硬件平台 'Big Sur' Facebook 今开源其 AI 所使用的硬件平台 'Big Sur'.'Big Sur' 是兼容开放机架的 GPU 加速硬件平台. ...

  7. BZOJ2274: [Usaco2011 Feb]Generic Cow Protests

    2274: [Usaco2011 Feb]Generic Cow Protests Time Limit: 10 Sec  Memory Limit: 128 MBSubmit: 196  Solve ...

  8. datagridview的数据源的操作

    using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; usin ...

  9. Symmetric Tree——LeetCode

    Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center). For e ...

  10. 快速生成apk 自动发布到网站 便于测试

    遇到的问题: 开发者生成的apk 需要不断给 测试安装让他们测试.有没有脚本自动将最新apk上传到服务器,让测试自己安装测试呢?mac电脑 怎么自己搭建文件服务器  启动Tomcat功能在这里不在赘述 ...