Fill Patern for Page Heap
ZZ from
http://myang1969.wordpress.com/2007/11/04/heap-overrununderrun/
Alloc/Free |
Page Mode |
Fill Pattern (4) |
PageHeap metadata (24) |
Fill Pattern (4) |
Accessible area |
Suffix Pattern |
Alloc |
Normal |
ABCDAAAA |
|
DCBAAAAA |
E0… |
A0A0A0A0… |
Free |
Normal |
ABCDAAA9 |
|
DCBAAAA9 |
F0… |
A0A0A0A0… |
Alloc |
Full |
ABCDBBBB |
|
DCBABBBB |
C0 |
D0D0D0D0… |
Free |
Full |
ABCDBBBA |
|
DCBABBBA |
F0 |
D0D0D0D0… |
2. The fill patterns for allocate and free are different.
3. Suffix Pattern, because the allocated size is not always exactly the same as request ((requested bytes) + / 8 * 8), the extra heap is filled with Suffix Pattern.
4. There is inaccessible page if pageheap is enabled under full mode to protect underruns and overruns, the application causes an access violation when under/overrun the allocated heap.
4.1. Behind Suffix Pattern block
4.2. Inform of Accessible area.