xxxxxxxxxx
// C program to demonstrate heap overflow
// by continuously allocating memory
#include<stdio.h>
int main()
{
for (int i=0; i<10000000; i++)
{
// Allocating memory without freeing it
int *ptr = (int *)malloc(sizeof(int));
}
}