<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Nov 20, 2013 at 10:16 AM, Andres Valloud <span dir="ltr">&lt;<a href="mailto:avalloud@smalltalk.comcastbiz.net" target="_blank">avalloud@smalltalk.comcastbiz.net</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im HOEnZb">On 11/20/13 8:51 , Eliot Miranda wrote:<br>
</div><div class="im HOEnZb"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
No matter what, the following defines a function that takes an integer<br>
and returns the result of malloc:<br>
<br>
#include &lt;stdlib.h&gt;<br>
void *malloc_wrapper(int n) { return malloc(n); }<br>
<br>
This wrapper can be auto-generated and compiled into a shared object or<br>
dll and used to wrap whatever crap the underlying platform chooses to<br>
use in implementing malloc.<br>
</blockquote>
<br></div><div class="im HOEnZb">
This is the same that I said before: just write a few lines of C, and use a C compiler to make prims or VM plugins (in the shape of a .dll or .so file).<br></div></blockquote><div><br></div><div>But you apparently miss the point that it can also be used to help a general FFI functon, and that FFI is much more useful than plugins, as discussed in this and related threads.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
    Generally, I agree that one could carefully and consciously write<br>
    comparatively small primitives and/or plugins.  Then, one could<br>
    compile those with a C compiler in a compilation environment<br>
    compatible with that of the VM.  And then, one could call those<br>
    primitives and/or plugins from the image with the expectation<br>
    (within reason) that they should work.<br>
</blockquote>
<br></div></div><span class="HOEnZb"><font color="#888888">
Andres.</font></span></blockquote><div><br></div><div>-- </div></div><div>Eliot</div>
</div></div>