LabWindows/CVI

TDMS_AllocateAlignedMemory

int TDMS_AllocateAlignedMemory (size_t memorySize, size_t memoryAlignment, void *memoryPointer);

Purpose

Allocates memory with the specified alignment. Using aligned memory can improve streaming performance in certain situations.

Parameters

Input
Name Type Description
memorySize size_t The size in bytes of the memory block this function will allocate.
memoryAlignment size_t The alignment in bytes of the memory block this function will allocate. This value must be an integer power of two.
Output
Name Type Description
memoryPointer void * The pointer to the memory block allocated by this function. Pass the address of a pointer variable.

Call TDMS_FreeAlignedMemory to free memory allocated with this function.

Return Value

Name Type Description
status int Return value indicating whether the function was successful. Unless otherwise stated, zero represents successful execution and a negative number represents the error code.

Error codes are defined in cvi\include\cvitdms.h.

Additional Information

Library: TDM Streaming Library

Include file: cvitdms.h

LabWindows/CVI compatibility: LabWindows/CVI 2013 and later

© 2016 National Instruments. All rights reserved.

Examples

Refer to the following examples that use the TDMS_AllocateAlignedMemory function:

  • TDM Streaming\Advanced Read and Write\TDMS Advanced Async Read\TDMS Advanced Async Read.cws

    Open example
  • TDM Streaming\Advanced Read and Write\TDMS Advanced Async Read Throughput Test\TDMS Advanced Async Read Throughput Test.cws

    Open example
  • TDM Streaming\Advanced Read and Write\TDMS Advanced Async Write\TDMS Advanced Async Write.cws

    Open example
  • TDM Streaming\Advanced Read and Write\TDMS Advanced Async Write Throughput Test\TDMS Advanced Async Write Throughput Test.cws

    Open example
  • TDM Streaming\Advanced Read and Write\TDMS Advanced Sync Read\TDMS Advanced Sync Read.cws

    Open example
  • TDM Streaming\Advanced Read and Write\TDMS Advanced Sync Write\TDMS Advanced Sync Write.cws

    Open example

Log in to get a better experience