Re: quick question
Hi Olivier,
> what is annoying is that when I put
> ShareMem as the first 'uses' in *every*
> dlls and the main program, everything
> works fine, but as soon as i put
> FastMM4 in '..\Common\FastMM\FastMM4.pas',
> as the first 'uses' in *every* dlls and
> the main program, it works for some
> times then suddendly dissapears.
If you use ShareMem.pas, then one memory manager is shared between the
application and all the libraries. If you do not (like just adding
FastMM4.pas to the top of the uses without setting the sharing options),
then each library and the main application has their own MM. I guess you are
passing long strings or dynamic arrays around and that causes problems in
the latter case.
Look in the FAQ for tips on how to share the FastMM memory manager between
the application and libraries.
Regards,
Pierre
--
Fastcode Project:
http://www.fastcodeproject.org/
.
Relevant Pages
- Re: Memory Management
... I have implemented a memory manager for some SDK I'm working on (a ... other libraries, including the STL. ... operators, and that woks, but it just doesn't feel safe. ... If you're building a program out of a bunch of DLLs, then it's a bit harder, ... (microsoft.public.vc.language) - Re: EncryptMessage Memory leak
... You are correct about the dlls, ... I should say in any case that these two libraries are the main difference ... Yet memory continues to be leaked in the EncryptMessage call (I've proved ... these two dlls then I could see how you'd leak memory. ... (microsoft.public.platformsdk.security) - Re: Linux, X, ld, gcc, linking, shared libraries and stuff
... all the dependent DLLs (and all their dependent DLLs and all their ... DLL, though, this triggers the OS to actual load and link that DLL...hence, ... if your libraries are accessed almost immediately and ... As noted, though, most OSes out there are anything but "toolmaker's view" ... (alt.lang.asm) - Re: WM_TIMER crash (maybe)?
... addition, I suspect that, given the debug dialog IS, in fact, a dialog, and therefore it ... For example, if you install VC, it typically installs the ... that you could be replacing older DLLs with the latest redistributable DLLs. ... the rest were system DLLs, including OLE/COM libraries ... (microsoft.public.vc.mfc) - Re: COBOLs Influence on C
... paths get fixed by changing to dlls. ... objects) are dynamic load libraries. ... It fails the job hours before the program runs, thereby allowing the error to be fixed. ... Who changes the library load paths? ... (comp.lang.cobol) |
|