7 void factor_vm::c_to_factor_toplevel(cell quot)
9 c_to_factor(quot,this);
19 #define SUFFIX ".image"
22 /* You must delete[] the result yourself. */
23 const char *default_image_path()
25 const char *path = vm_executable_path();
28 return "factor.image";
30 int len = strlen(path);
31 char *new_path = new char[PATH_MAX + SUFFIX_LEN + 1];
32 memcpy(new_path,path,len + 1);
33 memcpy(new_path + len,SUFFIX,SUFFIX_LEN + 1);
34 free(const_cast<char *>(path));
42 ret = clock_gettime(CLOCK_MONOTONIC,&t);
44 fatal_error("clock_gettime failed", 0);
45 return (u64)t.tv_sec * 1000000000 + t.tv_nsec;