March 19, 2013
4:18 p.m.
On Tue, 19 Mar 2013 20:41:55 +0530, Niroj Pokhrel said:
#include<stdio.h> int main() { while(1) { } return 0; }
I don't understand where does mmap or malloc come in to play in this code.
Unless you linked it statically, a lot of stuff happens before you ever get to main() - namely, any shared library linking and mapping. Run strace on your binary and see how many system calls happen before you hit the infinite loop.