标签:release get 操作 win 构建 空闲 www pcre lan
1 #include <stdio.h>
2 #include <windows.h>
3
4 void main()
5 {
6 HLOCAL h1, h2, h3, h4;
7 HANDLE hp;
8
9 // 启用快表
10 hp = HeapCreate(0, 0, 0);
11 printf("hp: %p\n", hp);
12
13 // 避免程序监测出调试器而使用调试堆管理策略
14 __asm int 3
15
16 h1 = HeapAlloc(hp, HEAP_ZERO_MEMORY, 8);
17 printf("h1: %p\n", h1);
18 h2 = HeapAlloc(hp, HEAP_ZERO_MEMORY, 8);
19 printf("h2: %p\n", h2);
20 h3 = HeapAlloc(hp, HEAP_ZERO_MEMORY, 16);
21 printf("h3: %p\n", h3);
22 h4 = HeapAlloc(hp, HEAP_ZERO_MEMORY, 24);
23 printf("h4: %p\n", h4);
24
25 HeapFree(hp, 0, h1);
26 HeapFree(hp, 0, h2);
27 HeapFree(hp, 0, h3);
28 HeapFree(hp, 0, h4);
29
30 h2 = HeapAlloc(hp, HEAP_ZERO_MEMORY, 16);
31 printf("h2: %p\n", h2);
32
33 HeapFree(hp, 0, h2);
34 }
标签:release get 操作 win 构建 空闲 www pcre lan
原文地址:http://www.cnblogs.com/fishbool/p/6705233.html