maj segfault and add param send function for type value return : ptr or value