title: Disable dynamic memory allocation?
body: <p>I'm trying to disable dynamic memory allocation altogether in a low-resource application.  I don't ever use malloc/free etc and as far as I can tell neither do any of my dependencies.</p>
  
  <p>I've tried zero-ing out the heap in the linker file <code>LinkerScript.ld</code>:</p>
  
  <pre><code>_Min_Heap_Size = 0x000;  /* required amount of heap  */
  </code></pre>
  
  <p>But that does not seem to be a guarantee that no library function will try to call <code>malloc</code>.</p>
  
  <p><strong>Is there a way to enforce that no dynamic memory allocation can take place and fail the build if so?</strong></p>
  
  <p>There is NO operating system on this project (bare-metal, <a href="https://www.st.com/en/evaluation-tools/nucleo-f302r8.html" rel="nofollow noreferrer">STM32F302R8</a>) cross-compiled with <code>arm-none-eabi-gcc</code>.</p>