This feature is not supported on the Wolfram Cloud.

int WSAllocParameter(WSEnvironmentParameter*p,WSAllocator*a,WSDeallocator*d)
retrieves the current memory allocator and deallocator function pointers from the WSEnvironmentParameter object p and stores them in a and d.


  • WSAllocParameter() returns error codes using the standard error values as returned by WSError().
  • On success WSAllocParameter() returns WSEOK.
  • WSEnvironmentParameter objects are used to control runtime characteristics of a WSTP environment.
  • WSAllocParameter() is declared in the WSTP header file wstp.h.

ExamplesExamplesopen allclose all

Basic Examples  (1)Basic Examples  (1)

#include "wstp.h"

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

void f(WSEnvironmentParameter p)
    WSAllocator a;
    WSDeallocator d;
    int result;

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

    /* ... */