Lenart Gabor writes:
> 
> On Tue, Jan 12, 1999 at 12:52:38PM +0100, Lenart Gabor wrote:
> > Of course the elegant mmap( ... MAP_SHARED ...)-like way cannot be used
> > but there can be a syscall to load a library into the memory. If the
> > library is IN the memory already, kernel only give a pointer to it (and
> > increment library used counter, if it hits zero on decrement memory
> > can be freed used by library), else kernel loads the library.
> 
> This can be done for executables as well, of course ...
> How does ELKS do it at the moment ?
> 

When a binary is being loaded, the inode of the binary file is checked
against all other running tasks. If another task has the same inode, then
that tasks text segment is used instead of loading off disk again. A
similar scheme is used in the shared library load system call.

Al

Reply via email to