C++ Logo

std-proposals

Advanced search

Re: [std-proposals] set_new_handler extension

From: Thiago Macieira <thiago_at_[hidden]>
Date: Sun, 12 Feb 2023 08:54:09 -0800
On Sunday, 12 February 2023 08:41:21 PST Jens Maurer via Std-Proposals wrote:
> That's already the specified behavior when you provide your own
> definition of global "operator new" and global "operator delete":
> You replace those functions program-wide.
>
> The implementation you use may behave differently when DLLs
> are involved; please discuss this with your implementer.

It does and that cannot be changed on Windows without a major overhaul of just
how the "dynamic linking" part of "dynamic linking libraries" work. In other
words, this is not just a (compile-time) linker problem, it's mostly a program
loader and file format problem.

Even macOS/Darwin adopted some of the characteristics that are problematic, so
I don't know how well it works on those OS and, if it does work, just how.

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel DCAI Cloud Engineering

Received on 2023-02-12 16:54:12