[cfe-dev] How to disable/override __builtin_operator_new/delete?

James Robertson via cfe-dev cfe-dev at lists.llvm.org
Wed Mar 21 15:43:52 PDT 2018


Hi,

I'm trying to get my own global operator new/delete calls working that my
memory manager plugs into.

This code is working fine on MacOS (clang) and Windows (Visual Studio), but
on iOS I have a third party library (lohmann json) returning a std::string
object which appears to have been allocated through my ::operator new
function (I.e., my memory manager) but is being deleted through
__builtin_operator_delete.  Which just results in a crash almost
immediately after the app starts.

So how do I disable these particular builtin functions?

Cheers,
James
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20180321/aaca380e/attachment.html>


More information about the cfe-dev mailing list