diff options
| author | mo <mokha@cisco.com> | 2016-06-22 18:03:08 -0400 |
|---|---|---|
| committer | mo <mokha@cisco.com> | 2016-06-22 18:03:08 -0400 |
| commit | 5b1e4d4a645ad152358c999fae79f4ae337b9128 (patch) | |
| tree | bf01a403b7579618a8b930732996ed04dcb143fc | |
| parent | 9385ac7a061771e123326500b1cbe37e2c086d89 (diff) | |
complete lab04
| -rw-r--r-- | lab04/mmu.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lab04/mmu.c b/lab04/mmu.c index d8dc198..6bb6768 100644 --- a/lab04/mmu.c +++ b/lab04/mmu.c @@ -11,9 +11,11 @@ int main() char *mallocptr = malloc(100); printf("\n"); - // print addresses of stack, BSS, data, heap segments + printf("Address of bss section var = 0x%08x\n", (unsigned)&bssvar); + printf("Address of data section var = 0x%08x\n", (unsigned)&datavar); + printf("Address of stack var = 0x%08x\n", (unsigned)&stackvar); + printf("Address of malloc'd space = 0x%08x\n", (unsigned)mallocptr); - // for extra credit, print the address of the code segment while (1) { sleep(10); } |
