Linux running on machines without an MMU (memory management unit) will copy all the process memory to fork ().
However, these systems are usually very small and embedded, and you probably don't need to worry about them.
Many services, such as the Apache fork model, use the initialize and fork () methods to share initialized data structures.
You should be aware that if you use languages ββsuch as Perl and Python that use reference counting variables or C ++ shared_ptr, this model will not work. This will not work, because as the reference count is adjusted up and down, the memory becomes unpartitioned and copied.
This results in a huge amount of memory usage in Perl daemons, such as SpamAssassin, which try to use the initialization model and fork.
source share