This is documentation for Mathematica 6, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)
MathLink C Function

MLAllocParameter()

int MLAllocParameter(MLParameters *p, MLAllocator *a, MLDeallocator *d)
retrieves the current memory allocator and deallocator function pointers from the MLParameters 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.
  • MLParameters objects are used to control runtime characteristics of a MathLink environment.
  • MLAllocParameter() is declared in the MathLink header file mathlink.h.
#include "mathlink.h"

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

void f(MLParameters* p)
{
    MLAllocator a;
    MLDeallocator d;
    int result;

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

    /* ... */
}