MLAllocParameter (C Function)

MLAllocParameter has been replaced by WSAllocParameter.

int MLAllocParameter(MLEnvironmentParameter*p,MLAllocator*a,MLDeallocator*d)

retrieves the current memory allocator and deallocator function pointers from the MLEnvironmentParameter object p and stores them in a and d.


  • MLAllocParameter() returns error codes using the standard error values as returned by MLError().
  • On success MLAllocParameter() returns MLEOK.
  • MLEnvironmentParameter objects are used to control runtime characteristics of a MathLink environment.
  • MLAllocParameter() is declared in the MathLink header file mathlink.h.


Basic Examples  (1)

#include "mathlink.h"

/* retrieves the memory allocator and deallocator function pointers
from MLParameters */

void f(MLEnvironmentParameter p)
    MLAllocator a;
    MLDeallocator d;
    int result;

    result = MLAllocParameter(p, &a, &d);
    if(result != MLEOK)
        { /* unable to retrieve the memory allocator pointers */ }

    /* ... */