<div dir="ltr">Hello,<br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jul 3, 2014 at 9:45 PM, Matthew Evans <span dir="ltr"><<a href="mailto:mattevans123@hotmail.com" target="_blank">mattevans123@hotmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


<div><div dir="ltr"><div><br></div><div>The question is is it safe to mix and match the Erlang memory allocation/deallocation NIF libraries with the standard Linux calls to free and malloc?</div><div><br></div></div></div>
</blockquote><div><br></div><div>Depends on what you mean by mix and match. It is ok to allocate with both malloc and enif_alloc in a nif as long as you deallocate with free and enif_free respectively. It does not work to allocate with enif_alloc and then deallocate with free.</div>
<div><br></div><div>Lukas</div></div></div></div>