Physical memory consumption in nk.exe when loading DLL

Physical memory consumption in nk.exe when loading DLL

Post by Georg Ell » Wed, 30 Jan 2002 19:03:30



Hello,

I work with WinCE 212, eMbedded Visual C++ 3.0 and a SH-4 Proc.
When I load a DLL with LoadLibrary() I found code and data of this DLL
also in the virtual address space of the kernel process nk.exe when
using "mi full" in cesh. That is ok. But the memory for the data (.bss
section) of the DLL is physically allocated in the process that loads
the DLL and in the kernel. So a global array with 100 KB in the DLL
requires 200 KB physical memory. In the kernel process this memory is
zero and I think never used.

Why is this so?
Is there a possibility to avoid the allocation of physical memory in
the kernel nk.exe for DLL-data?

Regards,
Georg

 
 
 

Physical memory consumption in nk.exe when loading DLL

Post by MS » Thu, 31 Jan 2002 06:25:41


This was done as an optimization to speed up the process of loading a second
copy of the DLL. We no longer had to read any info from disk to load the DLL
a second time.  It has been there from V1.0 on.  In WinCE.net this is no
longer done.
--
This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use. ? 2002 Microsoft Corporation. All rights
reserved.

Mikethom AT Microsoft DOTCOM

Quote:> Hello,

> I work with WinCE 212, eMbedded Visual C++ 3.0 and a SH-4 Proc.
> When I load a DLL with LoadLibrary() I found code and data of this DLL
> also in the virtual address space of the kernel process nk.exe when
> using "mi full" in cesh. That is ok. But the memory for the data (.bss
> section) of the DLL is physically allocated in the process that loads
> the DLL and in the kernel. So a global array with 100 KB in the DLL
> requires 200 KB physical memory. In the kernel process this memory is
> zero and I think never used.

> Why is this so?
> Is there a possibility to avoid the allocation of physical memory in
> the kernel nk.exe for DLL-data?

> Regards,
> Georg


 
 
 

1. Total Physical Memory and Available Physical Memory.

In the System Information screen of Windows XP Home
Edition I see several listings - one that states "Total
Physical Memory", in my case 512mb and another that
states "Available Physical Memory" which varies. I've seen
it as high as 322mb when first "booted". Why is there such
a big difference between the two? Is this normal?

I know what physical memory means, but what is the meaning
of "available" physical memory? Where has the memory gone?
Is it being consumed in the background? Is there
a "normal" or "optimal" ratio difference
between "available" and "physical"? Everything seems to be
operating fine. I was just wondering where it all goes,
and could my system be set to perform better?

2. Shutdown and Restarting problem (WinXP PRO)

3. Error: Module nk.exe relocations stripped, remove -fixed from link command,What's mean?

4. SLIP,WFW311, and me

5. How do I load a memory exe before windows xp starts to load?

6. Can't get "E" from my office address

7. How to lock a range of virtual memory to physical memory to prevent page fault

8. Outlook 98 -> CE 2.1 sync problem

9. Virtual memory with 200MB free physical memory?

10. physical memory/avail memory

11. Virtual memory with 200MB free physical memory?

12. How can I tell my app to use PHYSICAL memory instead of VIRTUAL memory?

13. IE6 and exaggerated memory consumption