Skip to content

Commit

Permalink
fix to get better heap location
Browse files Browse the repository at this point in the history
  • Loading branch information
remzi-arpacidusseau committed May 19, 2019
1 parent 9bff66d commit 3c237ad
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions vm-intro/va.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
#include <stdlib.h>

int main(int argc, char *argv[]) {
printf("location of code : %p\n", main);
printf("location of heap : %p\n", malloc(1));
printf("location of code : %p\n", main);
printf("location of heap : %p\n", malloc(100000000));
int x = 3;
printf("location of stack : %p\n", &x);
printf("location of stack: %p\n", &x);
return 0;
}

0 comments on commit 3c237ad

Please sign in to comment.