Re: CE DLL alignment.

Tech-Archive recommends: Fix windows errors by optimizing your registry



On May 25, 9:40 am, Henrik Viklund <henrik.vikl...@xxxxxxxxx> wrote:
Each dll is aligned to a 64kb boundary so a 72kb dll would effectively
use 128kb memory. If you use CE5 or older you probably will find this
(old but still useful) article interesting:

http://msdn2.microsoft.com/en-us/library/ms836325.aspx

Henrik Viklundhttp://www.addlogic.se

On May 25, 12:46 am, ganesan <ganesan.nagra...@xxxxxxxxx> wrote:

Hi

I just want to make sure I am on the right track.

1. If I have a DLL of < 64K, it occupies a DLL space (virtual memory)
of 64 KB. Fine.

What's the dll space occupied by a dll of 70K? Is it 128K? or 72K (4K
boundary) ?

Thanks
Ganesan

Thanks much for the reply.

Sorry, forgot to add my second question while posting the first
question :-)

Hoping for an answer to the following question.

If I created a DLL for ~63.5 K < 64K, I think it will just occupy 64K
of DLL space memory.

Is there anyway possible that while loading this "close to 64K dll",
it actually occupies 128K?
meaning the OS needs space or loads some OS code (basically OS needs
some space for each dll) etc. before each dll is loaded?

Apologies,
Reason to ask this question is,

Can I code DLLs of size 63.5 K or 127.8 K and be sure it will occupy
only 64K and 128K respectively in DLL space and NOT 128K and 192K
because the OS also needed some additional space for dll loads?

We have some memory issue in some Pocket PC's, where, in process
"device.exe" the dll space "growing down" and program memory "growing
up"
clashes, resulting in problems. We do have a memory tool called
"MemoRx.exe" which dumps this clash and we try to adjust our code
(dlls).

But I want to make sure I code the DLLs properly to avoid this issue.

I appreciate any answer is advance!

Thanks very much
Ganesan

.



Relevant Pages

  • Re: Why do we need executables in certain formats ?
    ... > complex binary formats was that programs need to be relocated, ... > perhaps linked with libraries. ... Modern virtual memory processors can locate to ... > has a hidden problem with the new .DLL. ...
    (comp.lang.asm.x86)
  • Re: Why is Base3.exe using 700+ K in windows task manager ?
    ... DLL function. ... handles opened by any thread of the calling process ... The DLL allocates memory from the virtual address space of the calling ... Who can tell where memory is really located in a virtual adress space? ...
    (alt.lang.asm)
  • Re: shared DLL VS static Link, Are they different?
    ... MFC exits, and if there is any memory that is freed at that time, MFC will ... business dumping leaks; it should wait until the CRT DLL dumps leaks after ... ALL RESOURCES OWNED BY THAT PROCESS ARE RELEASED. ...
    (microsoft.public.vc.mfc)
  • Re: Linking to a .NET dll from C#
    ... for obtaining price quotes and performance is absolutely critical. ... be to use shared memory or memory mapped files. ... Be aware that in these scenarios you're responsible for patching and updates, as the application will no longer rely on the clients machine to keep the framework up to date. ... Determine if a certain managed .NET dll or assembly is loaded ...
    (microsoft.public.dotnet.general)
  • Re: Memory Management Tools
    ... Memory limits in 32 Bit world. ... There is still a fairly high risk in moving ... One area where real optimization actually is possible is DLL rebasing. ... Well, the Windows loader, which loads the DLL into memory (which in ...
    (microsoft.public.windows.terminal_services)