# HG changeset patch # User jwe # Date 1143068292 0 # Node ID 8bf74c0b2cbf77da99299b9f5a959e6eeaa2cd87 # Parent f8e4679b420f69bf9eb22495ecec7634518719b8 [project @ 2006-03-22 22:58:12 by jwe] diff --git a/liboctave/CSparse.cc b/liboctave/CSparse.cc --- a/liboctave/CSparse.cc +++ b/liboctave/CSparse.cc @@ -5650,20 +5650,18 @@ cm->hypotenuse = CHOLMOD_NAME(hypot); #ifdef HAVE_METIS - // METIS 4.0.1 uses malloc and free, and will terminate MATLAB if - // it runs out of memory. Use CHOLMOD's memory guard for METIS, - // which mxMalloc's a huge block of memory (and then immediately - // mxFree's it) before calling METIS + // METIS 4.0.1 uses malloc and free, and will terminate if + // it runs out of memory. Use CHOLMOD's memory guard for + // METIS, which allocates a huge block of memory (and then + // immediately frees it) before calling METIS cm->metis_memory = 2.0; #if defined(METIS_VERSION) #if (METIS_VERSION >= METIS_VER(4,0,2)) - // METIS 4.0.2 uses function pointers for malloc and free + // METIS 4.0.2 uses function pointers for malloc and free. METIS_malloc = cm->malloc_memory; METIS_free = cm->free_memory; - // Turn off METIS memory guard. It is not needed, because mxMalloc - // will safely terminate the mexFunction and free any workspace - // without killing all of octave. + // Turn off METIS memory guard. cm->metis_memory = 0.0; #endif #endif diff --git a/liboctave/dSparse.cc b/liboctave/dSparse.cc --- a/liboctave/dSparse.cc +++ b/liboctave/dSparse.cc @@ -5871,20 +5871,18 @@ cm->hypotenuse = CHOLMOD_NAME(hypot); #ifdef HAVE_METIS - // METIS 4.0.1 uses malloc and free, and will terminate MATLAB if - // it runs out of memory. Use CHOLMOD's memory guard for METIS, - // which mxMalloc's a huge block of memory (and then immediately - // mxFree's it) before calling METIS + // METIS 4.0.1 uses malloc and free, and will terminate if + // it runs out of memory. Use CHOLMOD's memory guard for + // METIS, which allocates a huge block of memory (and then + // immediately frees it) before calling METIS cm->metis_memory = 2.0; #if defined(METIS_VERSION) #if (METIS_VERSION >= METIS_VER(4,0,2)) - // METIS 4.0.2 uses function pointers for malloc and free + // METIS 4.0.2 uses function pointers for malloc and free. METIS_malloc = cm->malloc_memory; METIS_free = cm->free_memory; - // Turn off METIS memory guard. It is not needed, because mxMalloc - // will safely terminate the mexFunction and free any workspace - // without killing all of octave. + // Turn off METIS memory guard. cm->metis_memory = 0.0; #endif #endif diff --git a/liboctave/sparse-base-chol.cc b/liboctave/sparse-base-chol.cc --- a/liboctave/sparse-base-chol.cc +++ b/liboctave/sparse-base-chol.cc @@ -116,20 +116,18 @@ cm->hypotenuse = CHOLMOD_NAME(hypot); #ifdef HAVE_METIS - // METIS 4.0.1 uses malloc and free, and will terminate MATLAB if it runs - // out of memory. Use CHOLMOD's memory guard for METIS, which mxMalloc's - // a huge block of memory (and then immediately mxFree's it) before calling - // METIS + // METIS 4.0.1 uses malloc and free, and will terminate if it runs + // out of memory. Use CHOLMOD's memory guard for METIS, which + // allocates a huge block of memory (and then immediately frees it) + // before calling METIS cm->metis_memory = 2.0; #if defined(METIS_VERSION) #if (METIS_VERSION >= METIS_VER(4,0,2)) - // METIS 4.0.2 uses function pointers for malloc and free + // METIS 4.0.2 uses function pointers for malloc and free. METIS_malloc = cm->malloc_memory; METIS_free = cm->free_memory; - // Turn off METIS memory guard. It is not needed, because mxMalloc will - // safely terminate the mexFunction and free any workspace without killing - // all of MATLAB. + // Turn off METIS memory guard. cm->metis_memory = 0.0; #endif #endif diff --git a/src/DLD-FUNCTIONS/spchol.cc b/src/DLD-FUNCTIONS/spchol.cc --- a/src/DLD-FUNCTIONS/spchol.cc +++ b/src/DLD-FUNCTIONS/spchol.cc @@ -415,20 +415,18 @@ cm->hypotenuse = CHOLMOD_NAME(hypot); #ifdef HAVE_METIS - // METIS 4.0.1 uses malloc and free, and will terminate MATLAB if it runs - // out of memory. Use CHOLMOD's memory guard for METIS, which mxMalloc's - // a huge block of memory (and then immediately mxFree's it) before calling - // METIS + // METIS 4.0.1 uses malloc and free, and will terminate if it runs + // out of memory. Use CHOLMOD's memory guard for METIS, which + // allocates a huge block of memory (and then immediately frees it) + // before calling METIS. cm->metis_memory = 2.0; #if defined(METIS_VERSION) #if (METIS_VERSION >= METIS_VER(4,0,2)) - // METIS 4.0.2 uses function pointers for malloc and free + // METIS 4.0.2 uses function pointers for malloc and free. METIS_malloc = cm->malloc_memory; METIS_free = cm->free_memory; - // Turn off METIS memory guard. It is not needed, because mxMalloc will - // safely terminate the mexFunction and free any workspace without killing - // all of MATLAB. + // Turn off METIS memory guard. cm->metis_memory = 0.0; #endif #endif