|
SOLUTIONS
|
MATHEMATICA MATHLINK C 関数
MLAllocParameter()
int MLAllocParameter(MLParameters *p, MLAllocator *a, MLDeallocator *d)
現行のメモリアロケータ(割当て)とデアロケータ(解放)関数ポインタをMLParameters オブジェクト p から検索して,a と d に保存する.
詳細詳細
- MLAllocParameter() は,MLError()のように標準エラー値を使ってエラーコードを返す.
- 成功すると,MLAllocParameter()はMLEOKを返す.
- MLParametersオブジェクトはMathLink 環境の実行時間の特性をコントロールするのに使われる.
- MLAllocParameter() はMathLink ヘッダファイル mathlink.hの中で宣言される.
例題例題すべて開くすべて閉じる
例 (1)例 (1)
#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 */ }
/* ... */
}
Mathematica 9 is now available!
New to Mathematica?
Find your learning path »
Have a question?
Ask support »
