Created
January 2, 2011 20:42
-
-
Save msantos/762796 to your computer and use it in GitHub Desktop.
malloc/free example NIF
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-module(mem). | |
-export([ | |
alloc/1, | |
free/1 | |
]). | |
-on_load(on_load/0). | |
on_load() -> | |
erlang:load_nif("./mem", []). | |
alloc(_) -> | |
erlang:error(not_implemented). | |
free(_) -> | |
erlang:error(not_implemented). |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment