mirror of
https://github.com/Zenithsiz/ftmemsim-valgrind.git
synced 2026-02-04 10:21:20 +00:00
15 lines
190 B
C
15 lines
190 B
C
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
|
|
int main ( void )
|
|
{
|
|
int i;
|
|
char* p = malloc(1);
|
|
for (i = 2; i < 50; i++) {
|
|
p = realloc(p, i);
|
|
p[i-1] = 'z';
|
|
}
|
|
return 0;
|
|
}
|