I have observed that majority of the system calls, like fork() and rand() are prohibited inside the enclave. But, some of the memory based system calls, like mmap() are allowed.
Can anyone please explain why and how mmap() is allowed inside the enclaves?
Syscalls are generally not allowed inside enclaves. If you're able to call one of them, it means that the SDK replaces this libc function with it's own implementation. In the SDK it's under tlibc.