From 6498be585e96c56da720a29886aa5393b781d265 Mon Sep 17 00:00:00 2001 From: Matt Mullins Date: Fri, 20 Sep 2013 21:13:47 -0700 Subject: [PATCH] Print the addresses allocated I like looking at /proc/maps to see what this did! --- mmap_everything.c | 1 + 1 file changed, 1 insertion(+) diff --git a/mmap_everything.c b/mmap_everything.c index bc52ec6..2e9c7c3 100644 --- a/mmap_everything.c +++ b/mmap_everything.c @@ -24,6 +24,7 @@ int main() { p = mmap(0, size, PROT_READ, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); if (p != MAP_FAILED) { allocated[bit]++; + printf("mmap'ed 2**%zu bytes at %p\n", bit, p); } else { break; } -- 2.11.0