#include <windows.h>
#include <stdio.h>
#include "pure.h"
void main()
{
char *chunk;
HANDLE hHeap;
hHeap = GetProcessHeap();
chunk = (char *)HeapAlloc(hHeap, HEAP_GENERATE_EXCEPTIONS, 15);
printf("IsWritable(0, 1)? %d\n",
PurifyIsWritable(0, 1)); /* 0 */
printf("IsWritable(chunk, 1)? %d\n",
PurifyIsWritable(chunk, 1)); /* 1 */
printf("IsWritable(chunk, 16)? %d\n",
PurifyIsWritable(chunk, 16)); /* 0 */
}
(C) Copyright IBM Corporation 1992, 2010.