Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c++ > #5009

Re: Customize operator new / delete

Path csiph.com!x330-a1.tempe.blueboxinc.net!feeder1.hal-mli.net!weretis.net!feeder4.news.weretis.net!news.musoftware.de!wum.musoftware.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From Ian Collins <ian-news@hotmail.com>
Newsgroups comp.lang.c++
Subject Re: Customize operator new / delete
Date Mon, 16 May 2011 19:43:38 +1200
Lines 27
Message-ID <93c2tdFlpiU5@mid.individual.net> (permalink)
References <e557f572-1a34-4a96-aad9-ffd1241a71be@c41g2000yqm.googlegroups.com> <78a4d447-9756-4dbc-ac6d-3513dbcd5031@l6g2000vbn.googlegroups.com> <4dc6cd28$0$38644$4fafbaef@reader1.news.tin.it> <bb132999-0899-4e03-b5b8-942ef18d079d@a10g2000vbz.googlegroups.com> <4dca3b03$0$38643$4fafbaef@reader1.news.tin.it> <4dca40e0$0$18242$4fafbaef@reader2.news.tin.it> <053f6f0f-2caa-4fa3-b90d-2db959c12a28@d15g2000yqn.googlegroups.com> <1d442021-99b2-4fdd-bd66-506a57a07ae8@18g2000prd.googlegroups.com>
Mime-Version 1.0
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 7bit
X-Trace individual.net E5QnqAskDfWtwZi3AcgV6Abe95DuTDVUgmJupZg6tl3GaKf9H9
Cancel-Lock sha1:BunFudSZ/SUE+xiTUt9vlclB3uw=
User-Agent Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:1.9.2.9) Gecko/20101021 Lightning/1.0b2 Thunderbird/3.1.4
In-Reply-To <1d442021-99b2-4fdd-bd66-506a57a07ae8@18g2000prd.googlegroups.com>
Xref x330-a1.tempe.blueboxinc.net comp.lang.c++:5009

Show key headers only | View raw


On 05/16/11 06:54 PM, Joshua Maurice wrote:
> On May 15, 6:14 am, James Kanze<james.ka...@gmail.com>  wrote:
>> Except in very rare cases, you should not
>> link the C++ standard library as a DLL, but statically.
>
> Wait what? IIRC, msvc in newer versions has even removed the option of
> statically linking to the C++ standard library (the C runtime library
> or whatever Microsoft calls it).
>
> Also, I know I've heard about fun results that can happen in Windows
> if you have two different DLLs that both statically link to the C
> runtime, and try to allocate memory in one DLL and free that object in
> the other DLL.
>
> I just want to point out that your advice is clearly wrong for
> Windows. As a programmer, one should educate oneself a bit about your
> platform or platforms, and then make an informed decision. And that
> informed decision will not /not/ be "almost always statically link
> against the C++ standard library".

That can be extrapolated to other platforms as well.  There isn't a 
static C++ standard library provided for (Open)Solaris.  Indeed if there 
were, it would make interposing user provided new and delete operator a 
lot harder.

-- 
Ian Collins

Back to comp.lang.c++ | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Customize operator new / delete Nephi Immortal <immortalnephi@gmail.com> - 2011-05-07 19:11 -0700
  Re: Customize operator new / delete Ian Collins <ian-news@hotmail.com> - 2011-05-08 15:05 +1200
  Re: Customize operator new / delete James Kanze <james.kanze@gmail.com> - 2011-05-08 07:38 -0700
    Re: Customize operator new / delete "io_x" <a@b.c.invalid> - 2011-05-08 19:05 +0200
      Re: Customize operator new / delete Nephi Immortal <immortalnephi@gmail.com> - 2011-05-08 15:35 -0700
        Re: Customize operator new / delete Ian Collins <ian-news@hotmail.com> - 2011-05-09 10:45 +1200
      Re: Customize operator new / delete James Kanze <james.kanze@gmail.com> - 2011-05-10 13:25 -0700
        Re: Customize operator new / delete "io_x" <a@b.c.invalid> - 2011-05-11 09:31 +0200
          Re: Customize operator new / delete "io_x" <a@b.c.invalid> - 2011-05-11 09:56 +0200
            Re: Customize operator new / delete James Kanze <james.kanze@gmail.com> - 2011-05-15 06:14 -0700
              Re: Customize operator new / delete Joshua Maurice <joshuamaurice@gmail.com> - 2011-05-15 23:54 -0700
                Re: Customize operator new / delete Ian Collins <ian-news@hotmail.com> - 2011-05-16 19:43 +1200
                Re: Customize operator new / delete Nobody <nobody@nowhere.com> - 2011-05-16 12:53 +0100
              Re: Customize operator new / delete "io_x" <a@b.c.invalid> - 2011-05-18 17:32 +0200
                Re: Customize operator new / delete Pete Becker <pete@versatilecoding.com> - 2011-05-18 12:38 -0400
          Re: Customize operator new / delete James Kanze <james.kanze@gmail.com> - 2011-05-15 06:12 -0700
  Re: Customize operator new / delete "io_x" <a@b.c.invalid> - 2011-05-08 18:44 +0200
    Re: Customize operator new / delete Nephi Immortal <immortalnephi@gmail.com> - 2011-05-08 15:43 -0700
      Re: Customize operator new / delete "io_x" <a@b.c.invalid> - 2011-05-09 08:47 +0200
        Re: Customize operator new / delete Leigh Johnston <leigh@i42.co.uk> - 2011-05-09 12:58 +0100
          Re: Customize operator new / delete "io_x" <a@b.c.invalid> - 2011-05-10 08:15 +0200
            Re: Customize operator new / delete Leigh Johnston <leigh@i42.co.uk> - 2011-05-10 12:39 +0100
        Re: Customize operator new / delete James Kanze <james.kanze@gmail.com> - 2011-05-10 13:29 -0700

csiph-web