&gt; Functions like memcpy or malloc cannot legally be written in C without breaking this behavior<p>&gt; Also not true.<p>You cannot implement malloc in C because malloc always returns a pointer that&#x27;s not a part of an existing allocation. The malloc in libc has special dispensation from the compiler to do this (GCC &quot;malloc&quot; attribute).<p>Similarly you can&#x27;t implement pthread mutexes in C because they imply optimization barriers (all global memory might change) that a C function with a visible implementation wouldn&#x27;t have.