replace malloc by emalloc
change ffi_func_args into pointer
delete ffi_func_args