Re: Strange linker errors (LNK2005) in Release build only .... why ??



Hello Tom,

This is what I've resorted to now - the only downside being that all the
new calls in STL which land up using malloc will no longer be using
dlmalloc(). I'd rather not re-direct all STL containers by writing my own
allocator - way too intrusive and I'll be begging for trouble by missing
some corner conditions etc etc

On Unix* platforms we can build a "partially linked" image - i.e. not
resolving all the symbols to generate a sharedlib/dll. Why can't I find an
equivaent in Windows land ?!? Looks like the DLL's are quite tightly tied
together at link time....

Thanks,
rsk.


"Tom Widmer [VC++ MVP]" <tom_usenet@xxxxxxxxxxx> wrote in message
news:%23NiyMsq5FHA.3976@xxxxxxxxxxxxxxxxxxxxxxx
> Krishnan R.S. wrote:
>> So is there no way to override/replace malloc/free with my implementation
>> in
>> a dll ??
>
> Try adding USE_DL_PREFIX to your project defines.
>
> Tom


.



Relevant Pages

  • Re: GC in Jons raytracing benchmark
    ... Using new and delete with reference counting, ... > The simplest way to address this issue is to switch to C++ and use STL ... > containers instead of malloc and free. ... > and play around with multiple allocators or adaptive allocation and so on. ...
    (comp.lang.lisp)
  • Re: No need to optimize in assembly anymore
    ... better than container classes and STL? ... malloc or new functions if memory is not very big. ... > dislike about STL containers is that they use C++ exception handling. ... > Fast code should avoid malloc & new whenever possible. ...
    (comp.lang.asm.x86)
  • Re: No need to optimize in assembly anymore
    ... better than container classes and STL? ... malloc or new functions if memory is not very big. ... > dislike about STL containers is that they use C++ exception handling. ... > Fast code should avoid malloc & new whenever possible. ...
    (alt.lang.asm)