projects
/
mmap_everything.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
beb21db
)
Print the addresses allocated
author
Matt Mullins
<mmullins@mmlx.us>
Sat, 21 Sep 2013 04:13:47 +0000
(21:13 -0700)
committer
Matt Mullins
<mmullins@mmlx.us>
Sat, 21 Sep 2013 04:13:47 +0000
(21:13 -0700)
I like looking at /proc/maps to see what this did!
mmap_everything.c
patch
|
blob
|
history
diff --git
a/mmap_everything.c
b/mmap_everything.c
index
bc52ec6
..
2e9c7c3
100644
(file)
--- 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;
}