There is a relationship there, but itβs not quite direct or direct.
When your DLL is first used, it maps to memory. This does not load it into memory, it simply allocates some address space in your process where it can / can be loaded if necessary. Then, individual DLL pages are loaded into memory via paging on demand, i.e. When you refer to some address space that has been allocated, the code (or data) will be loaded, associated with this / this address (addresses) if it is not already in memory.
Address mapping now takes up little space (one 4K page for every megabyte of address space that is displayed). Of course, when you load some data into memory, it also uses memory.
Please note, however, that most pages can / will be shared between processes, so if your DLL has been used by 5 different processes at the same time, it will be displayed 5 times (i.e. once for each process it uses), but in memory there will still be only one physical copy (at least usually).
Between them, it can be a little difficult to even determine exactly what you mean by memory consumption of a particular DLL.
source share