forkbeing copy-on-write is a property of the kernel of your operating system, not Ruby. Most UNIX-like systems have one.
On Linux, for example, you can look in /proc/pid/smapsand see how many total heaps are displayed. Here is an example from bashdoing fork:
02020000-023cd000 rw-p 00000000 00:00 0 [heap]
Size: 3764 kB
Rss: 3716 kB
Pss: 1282 kB
Shared_Clean: 0 kB
Shared_Dirty: 3652 kB
Private_Clean: 0 kB
Private_Dirty: 64 kB
Referenced: 144 kB
Anonymous: 3716 kB
AnonHugePages: 0 kB
Swap: 0 kB
KernelPageSize: 4 kB
MMUPageSize: 4 kB
Locked: 0 kB
So out of its 3764k heap, 3652k is common. See proc.txt for file documentation in /proc.
, Ruby -, COW (, , ), , 0.