Large memory allocation request will not be satisfied using heap. Kernel allocates an anonymous memory mapping for this type of request. Anonymous memory mapping is like file-based memory mapping except it is not backed by any file, thus the name. It is just a large piece of zero-filled memory area (in multiple of page size) ready for use.
Anonymous memory mapping uses mmapp call with special flag MAP_ANONYMOUS. The fd parameter is ignored. In BSD without the flag, anonymous memory mapping is implemented by mapping /dev/null with copy-on-write pages.
No comments:
Post a Comment