Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: b2ec94661847cbc93e77486c0ca62fe6584a4858 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>

#define SIZE 100
int main() {
	if (fork()) {
		int *a = (int *)malloc(sizeof(int) * SIZE);
		int *b = (int *)malloc(sizeof(int) * SIZE);
		int *c = (int *)malloc(sizeof(int) * SIZE);
		free(a);
		free(b);
		free(c);
	}
	else {
		execv("../alloctest/Debug/alloctest", NULL);
		perror("execv");
	}
	return 0;
}

Back to the top