You still only have one firefox binary in memory.
What happens is that the second/third click directs the first firefox to fork a new instance - sharing all code.
Only new data pages get allocated.
This is done so that the new window can pop up immediately - the only delay is the data to display.
Even if you manually run the process you will still get only one binary as long as the path used is the same as for the first instance. Only if you have two versions installed and start each one will you get a new binary load - as the path name now point to two different applications.
This is part of the normal "deduplication" done by the kernel. If the same inode is being referenced (and is already loaded) then there is no need to load a new copy - it just duplicates the memory map for the code segment, and allocates a new stack+heap (the data space), and the program starts.
In addition, it is possible (I'm not sure Firefox does this, but I ran across the feature quite a while ago) that the same firefox process just opens a new window...
Chrome does this, and just starts a new thread for each tab/window.
Last edited by jpollard; 03-31-2014 at 06:42 PM.
|