GNU Octave  4.4.1
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
mex Class Reference
Collaboration diagram for mex:

Public Member Functions

 mex (octave_mex_function *f)
 
 mex (const mex &)=delete
 
 ~mex (void)
 
void * calloc (size_t n, size_t t)
 
void * calloc_unmarked (size_t n, size_t t)
 
octave_mex_functioncurrent_mex_function (void) const
 
void free (void *ptr)
 
bool free_value (mxArray *ptr)
 
const char * function_name (void) const
 
mxArraymake_value (const octave_value &ov)
 
void * malloc (size_t n)
 
void * malloc_unmarked (size_t n)
 
void mark (void *ptr)
 
mxArraymark_array (mxArray *ptr)
 
void mark_foreign (void *ptr)
 
mexoperator= (const mex &)=delete
 
void * realloc (void *ptr, size_t n)
 
void unmark (void *ptr)
 
void unmark_array (mxArray *ptr)
 
void unmark_foreign (void *ptr)
 

Public Attributes

int trap_feval_error = 0
 

Private Member Functions

void global_mark (void *ptr)
 
void global_unmark (void *ptr)
 

Private Attributes

std::set< mxArray * > arraylist
 
octave_mex_functioncurr_mex_fcn
 
char * fname
 
std::set< void * > foreign_memlist
 
std::set< void * > memlist
 

Static Private Attributes

static std::set< void * > global_memlist
 

Detailed Description

Definition at line 2117 of file mex.cc.

Constructor & Destructor Documentation

◆ mex() [1/2]

mex::mex ( octave_mex_function f)
inline

Definition at line 2121 of file mex.cc.

◆ mex() [2/2]

mex::mex ( const mex )
delete

◆ ~mex()

mex::~mex ( void  )
inline

Definition at line 2130 of file mex.cc.

References arraylist, error(), fname, function_name(), memlist, mxFree(), p, and xfree().

Member Function Documentation

◆ calloc()

void* mex::calloc ( size_t  n,
size_t  t 
)
inline

Definition at line 2213 of file mex.cc.

References calloc_unmarked(), mark(), and t.

Referenced by mxCalloc().

◆ calloc_unmarked()

void* mex::calloc_unmarked ( size_t  n,
size_t  t 
)
inline

Definition at line 2203 of file mex.cc.

References malloc_unmarked(), and t.

Referenced by mxArray::calloc(), and calloc().

◆ current_mex_function()

octave_mex_function* mex::current_mex_function ( void  ) const
inline

Definition at line 2376 of file mex.cc.

References curr_mex_fcn.

Referenced by mexAtExit().

◆ free()

void mex::free ( void *  ptr)
inline

Definition at line 2256 of file mex.cc.

References foreign_memlist, global_memlist, p, unmark(), warning(), and xfree().

Referenced by mxFree().

◆ free_value()

bool mex::free_value ( mxArray ptr)
inline

Definition at line 2356 of file mex.cc.

References arraylist, p, and warning().

Referenced by mxDestroyArray().

◆ function_name()

◆ global_mark()

void mex::global_mark ( void *  ptr)
inlineprivate

Definition at line 2406 of file mex.cc.

References function_name(), global_memlist, and warning().

Referenced by malloc_unmarked().

◆ global_unmark()

void mex::global_unmark ( void *  ptr)
inlineprivate

Definition at line 2417 of file mex.cc.

References function_name(), global_memlist, p, and warning().

◆ make_value()

mxArray* mex::make_value ( const octave_value ov)
inline

Definition at line 2350 of file mex.cc.

References mark_array().

Referenced by mexCallMATLAB(), and mexGetVariable().

◆ malloc()

void* mex::malloc ( size_t  n)
inline

Definition at line 2193 of file mex.cc.

References malloc_unmarked(), and mark().

Referenced by mxMalloc(), and realloc().

◆ malloc_unmarked()

void* mex::malloc_unmarked ( size_t  n)
inline

Definition at line 2176 of file mex.cc.

References error(), function_name(), and global_mark().

Referenced by calloc_unmarked(), mxArray::malloc(), and malloc().

◆ mark()

void mex::mark ( void *  ptr)
inline

Definition at line 2285 of file mex.cc.

References function_name(), memlist, and warning().

Referenced by calloc(), and malloc().

◆ mark_array()

mxArray* mex::mark_array ( mxArray ptr)
inline

Definition at line 2309 of file mex.cc.

References arraylist.

Referenced by make_value(), and maybe_mark_array().

◆ mark_foreign()

void mex::mark_foreign ( void *  ptr)
inline

Definition at line 2324 of file mex.cc.

References foreign_memlist, function_name(), and warning().

Referenced by maybe_mark_foreign().

◆ operator=()

mex& mex::operator= ( const mex )
delete

◆ realloc()

void* mex::realloc ( void *  ptr,
size_t  n 
)
inline

Definition at line 2225 of file mex.cc.

References global_memlist, malloc(), memlist, and p.

Referenced by mxRealloc().

◆ unmark()

void mex::unmark ( void *  ptr)
inline

Definition at line 2297 of file mex.cc.

References function_name(), memlist, p, and warning().

Referenced by free(), and maybe_unmark().

◆ unmark_array()

void mex::unmark_array ( mxArray ptr)
inline

Definition at line 2315 of file mex.cc.

References arraylist, and p.

Referenced by maybe_unmark_array().

◆ unmark_foreign()

void mex::unmark_foreign ( void *  ptr)
inline

Definition at line 2335 of file mex.cc.

References foreign_memlist, function_name(), p, and warning().

Member Data Documentation

◆ arraylist

std::set<mxArray *> mex::arraylist
private

Definition at line 2393 of file mex.cc.

Referenced by free_value(), mark_array(), unmark_array(), and ~mex().

◆ curr_mex_fcn

octave_mex_function* mex::curr_mex_fcn
private

Definition at line 2387 of file mex.cc.

Referenced by current_mex_function().

◆ fname

char* mex::fname
mutableprivate

Definition at line 2400 of file mex.cc.

Referenced by function_name(), and ~mex().

◆ foreign_memlist

std::set<void *> mex::foreign_memlist
private

Definition at line 2397 of file mex.cc.

Referenced by free(), mark_foreign(), and unmark_foreign().

◆ global_memlist

std::set< void * > mex::global_memlist
staticprivate

Definition at line 2403 of file mex.cc.

Referenced by free(), global_mark(), global_unmark(), and realloc().

◆ memlist

std::set<void *> mex::memlist
private

Definition at line 2390 of file mex.cc.

Referenced by mark(), realloc(), unmark(), and ~mex().

◆ trap_feval_error

int mex::trap_feval_error = 0

Definition at line 2382 of file mex.cc.

Referenced by mexCallMATLAB(), mexCallMATLABWithTrap(), and mexSetTrapFlag().


The documentation for this class was generated from the following file: