2008-08-20 19:27:03 +00:00
|
|
|
#include <windows.h>
|
|
|
|
|
|
|
|
#define NUMPTRS 10
|
|
|
|
|
|
|
|
int main(int argc, char **argv) {
|
|
|
|
char *foo[NUMPTRS];
|
|
|
|
int i;
|
|
|
|
|
|
|
|
Sleep(10000);
|
|
|
|
|
|
|
|
for (i = 0; i < NUMPTRS; i++) {
|
|
|
|
foo[i] = malloc(256);
|
|
|
|
printf("%d: 0x%08x\n", i, foo[i]);
|
|
|
|
}
|
|
|
|
__asm {
|
|
|
|
int 3
|
|
|
|
}
|
|
|
|
for (i = 0; i < NUMPTRS; i+=2) {
|
|
|
|
free(foo[i]);
|
|
|
|
}
|
2009-08-06 20:09:38 +00:00
|
|
|
free(foo[1]);
|
|
|
|
free(foo[7]);
|
|
|
|
free(foo[3]);
|
2008-08-20 19:27:03 +00:00
|
|
|
__asm {
|
|
|
|
int 3
|
|
|
|
}
|
|
|
|
}
|