[This is preliminary documentation and is subject to change.]

Attempts to allocate (unmanaged) memory from MPI. This memory must be manually freed with a call to MPI_Free_mem(IntPtr). This routine is used automatically by the UnmanagedMemoryStream to allocate memory when serializing or de-serializing objects within MPI.NET.

Namespace:  MPI
Assembly:  MPI (in MPI.dll)
Version: 0.9.0.0 (0.9.0.0)

Syntax

C#
public static int MPI_Alloc_mem(
	IntPtr size,
	int info,
	out IntPtr baseptr
)
Visual Basic (Declaration)
Public Shared Function MPI_Alloc_mem ( _
	size As IntPtr, _
	info As Integer, _
	<OutAttribute> ByRef baseptr As IntPtr _
) As Integer
Visual C++
public:
static int MPI_Alloc_mem(
	IntPtr size, 
	int info, 
	[OutAttribute] IntPtr% baseptr
)

Parameters

size
Type: System..::.IntPtr
The number of bytes to allocate.
info
Type: System..::.Int32
Provides extra information to the MPI implementation that may help it allocate memory for a specific reason or from a specific memory pool.
baseptr
Type: System..::.IntPtr %
Will receive a pointer to the newly-allocated memory.

Return Value

MPI_SUCCESS if memory is successfully allocated, MPI_ERR_NO_MEM if no memory is available.

See Also