malloc:*** mach_vm_map(size = 18446744071761305600)失败(错误代码= 3)

时间:2016-05-14 22:40:08

标签: memory-management

我的程序因此错误而失败:

*** set a breakpoint in malloc_error_break to debug
ctffind(61810,0x7fff7a904310) malloc: *** mach_vm_map(size=18446744071761305600) failed (error code=3)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
Operating system error: Cannot allocate memory
Memory allocation failed in xmallocarray

我已开始使用Xcode的Instruments进行调查,并在运行期间记录了分配和内存泄漏,似乎libfltk.1.3.dylib和CoreGraphics使用的内存最多。但我不知道该怎么办。我根本不是程序员,我只是尝试使用我需要的科学应用程序。有没有办法重新编译程序,以便限制它要求分配多少内存?

Screenshot of Xcode Instruments Allocations

Screenshot of Xcode Instruments Leaks

包含“malloc”的配置部分

   { $as_echo "$as_me:$LINENO: checking for fftwf_malloc in -lmkl_rt" >&5
    $as_echo_n "checking for fftwf_malloc in -lmkl_rt... " >&6; }
    if test "${ac_cv_lib_mkl_rt_fftwf_malloc+set}" = set; then
      $as_echo_n "(cached) " >&6

#ifdef __cplusplus
extern "C"
#endif
char fftwf_malloc ();
int
main ()
{
return fftwf_malloc ();
  ;
  return 0;

 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
     test -z "$ac_c_werror_flag" ||
     test ! -s conftest.err
       } && test -s conftest$ac_exeext && {
     test "$cross_compiling" = yes ||
     $as_test_x conftest$ac_exeext
       }; then
  ac_cv_lib_mkl_rt_fftwf_malloc=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

    ac_cv_lib_mkl_rt_fftwf_malloc=no

{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_mkl_rt_fftwf_malloc" >&5
$as_echo "$ac_cv_lib_mkl_rt_fftwf_malloc" >&6; }
if test "x$ac_cv_lib_mkl_rt_fftwf_malloc" = x""yes; then
  HAVE_MKL="yes"
else
  HAVE_MKL="no"

{ $as_echo "$as_me:$LINENO: checking for library containing fftwf_malloc" >&5
$as_echo_n "checking for library containing fftwf_malloc... " >&6; }
if test "${ac_cv_search_fftwf_malloc+set}" = set; then
  $as_echo_n "(cached) " >&6
else
  ac_func_search_save_LIBS=$LIBS

     $as_test_x conftest$ac_exeext
       }; then
  ac_cv_search_fftwf_malloc=$ac_res
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

很抱歉,如果它很长,我不知道这意味着什么,我可以根据要求删除或添加更多相关部分

0 个答案:

没有答案