Allocate unmanaged memory.

Namespace:  AForge.Imaging
Assembly:  AForge.Imaging (in AForge.Imaging.dll) Version: 2.2.5.0 (2.2.5.0)

Syntax

C#
public static IntPtr Alloc(
	int size
)

Parameters

size
Type: System..::.Int32
Memory size to allocate.

Return Value

Return's pointer to the allocated memory buffer.

Remarks

The method allocates requested amount of memory and returns pointer to it. It may avoid allocation in the case some caching scheme is uses and there is already enough allocated memory available.

Exceptions

ExceptionCondition
System..::.OutOfMemoryExceptionThere is insufficient memory to satisfy the request.

See Also