我正在阅读维基百科中的mmap并尝试这个例子http://en.wikipedia.org/wiki/Mmap#Example_of_usage.我用gcc编译了这个程序并运行了valgrind overit.
这是valgrind输出:
# valgrind a.out
==7018== Memcheck, a memory error detector
==7018== Copyright (C) 2002-2011, and GNU GPL'd, by Julian Seward et al.
==7018== Using Valgrind-3.7.0 and LibVEX; rerun with -h for copyright info
==7018== Command: a.out
==7018==
PID 7018: anonymous string 1, zero-backed string 1
PID 7019: anonymous string 1, zero-backed string 1
PID 7018: anonymous string 2, zero-backed string 2
==7018==
==7018== HEAP SUMMARY:
==7018== in use at exit: 0 bytes in 0 blocks
==7018== …Run Code Online (Sandbox Code Playgroud) mmap ×1