title: Globaly replace all new operators
body: <p>I'm using an RTOS in an (embedded) C++ application. Since i'm working on an embedded target i try to keep the heap allocations to a minimum. However at some point STL classes like vector come in very handy.</p>
  
  <p>Because i'm using a RTOS, i have to make sure that the new/malloc() call is thread safe. Luckyly my RTOS (FreeRTOS) provides it's own (threadsafe) malloc() routines. I only do have to use them.</p>
  
  <p>So far i implemented the following new/delete pair and linked it into the binary.</p>
  
  <pre><code>void * operator new(size_t n) noexcept(false);
  
  
  void operator delete(void * p) noexcept(true);
  
  
  void operator delete(void * p, size_t n) noexcept(true);
  </code></pre>
  
  <p>However looking at this</p>
  
  <p><a href="https://en.cppreference.com/w/cpp/memory/new/operator_new" rel="nofollow noreferrer">https://en.cppreference.com/w/cpp/memory/new/operator_new</a></p>
  
  <p>shows me a dozen overloads of new (and as many overloads for delete).
  Do all new or delete overloads default to my replacement or am i missing an operator overload?</p>