I know that pmap of a process shows how the memory mapping is done. For example, the first lines of pmap output shows the memory mapping to the text segment of the process' executable. Assume I have a really big executable and my code size is large. For a small text segment(small executable) the pmamp shows 400000 - 401000 - 4096 B - 4 KiB of text segment mapped.
(1) If the text segment is really large how does it map? (2) Is it map dynamically based on the pages required as part of the code execution progress?