summaryrefslogtreecommitdiff
path: root/lab04/mmu.c
blob: d8dc19843a6b7e26c6eb64ff1d860f3a2fe1d57e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>

int bssvar;
int datavar = 99;

int main()
{
	int stackvar;
	char *mallocptr = malloc(100);

	printf("\n");
        // print addresses of stack, BSS, data, heap segments

	// for extra credit, print the address of the code segment
	while (1) {
		sleep(10);
	}
}