Ignore:
Timestamp:
04/18/12 15:17:58 (13 years ago)
Author:
Mathieu Morlighem
Message:

ALWAYS use Matlab's memory manager in mex modules

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/modules/InternalFront/InternalFront.cpp

    r11933 r12050  
    3636        /*Allocate and initialize all variables*/
    3737        numberofsegments=0;
    38         front=(int*)xmalloc(3*numberofelements*4*sizeof(int));
     38        front=(int*)mxMalloc(3*numberofelements*4*sizeof(int));
    3939
    4040        /*Loop over all elements on water*/
     
    8181        /*Now that we know how many segments there is we can allocate the final matrix*/
    8282        if(numberofsegments){
    83                 front2=(double*)xmalloc(4*numberofsegments*sizeof(double));
     83                front2=(double*)mxMalloc(4*numberofsegments*sizeof(double));
    8484                for(i=0;i<4*numberofsegments;i++) front2[i]=(double)front[i];
    8585        }
Note: See TracChangeset for help on using the changeset viewer.