Basically in Linux or any modern Unix, fork() will be implemented using mmap(). You do not copy any data, you do not create new data. You just mark everything copy on write and spawn a new process. Memory is allocated only once it starts to use it.
That said, Perl could do a better job of separating out data in use from code. (Right now when you start to write you do entirely too much copying.) I believe that is on the wishlist for 6.0.
In reply to RE (tilly) 1: Memory
by tilly
in thread Memory
by jettero
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |