In Linux,
when using mmap() for anonymous memory mapping, or using malloc(), do they allocate "space" from only physical memory, or either physical memory or swap or their combination? (I guess the later)
When using System V shared memory, does it (e.g. shmget()) create a shared memory segment out of only physical memory, or either physical memory or swap or their combination? (I guess the former, because shared memory is said to be a fast IPC mechanism)
When using POSIX shared memory, does it (e.g. shm_open()) create a shared memory object out of only physical memory, or either physical memory or swap or their combination? (I guess the former, because shared memory is said to be a fast IPC mechanism)
Thanks.