6.4 Shared Memory Services 6.4.1 viMemAlloc(vi, size, offset) 6.4.2 viMemAllocEx(vi, size, offset64) Purpose Allocate memory from a device’s memory region. Parameters Name Direction Type Description vi IN ViSession Unique logical identifier to a session. size IN ViBusSize Specifies the size of the allocation. or or OUT Returns the offset of the allocated device offset ViBusAddress offset64 ViBusAddress64 memory. Return Values Type This is the operational return status. It returns either a ViStatus completion code or an error code as follows. Completion Code Description VI_SUCCESS Operation completed successfully. Error Codes Description VI_ERROR_INV_SESSION The given session or object reference is invalid (both VI_ERROR_INV_OBJECT are the same value). VI_ERROR_NSUP_OPER The given does not support this operation. vi VI_ERROR_RSRC_LOCKED Specified operation could not be performed because the resource identified by has been locked for this vi kind of access. VI_ERROR_INV_SIZE Invalid size specified. VI_ERROR_ALLOC Unable to allocate shared memory block of the requested size. VI_ERROR_MEM_NSHARED The device does not export any memory. Description This operation returns an offset into a device’s memory region that has been allocated for use by this session. If the device to which the given refers is located on the local interface card, the memory can be vi allocated either on the device itself or on the computer’s system memory. Related Items and See the INSTR resource description. Also see viMemFree() viMemFreeEx(). Implementation Requirements OBSERVATION 6.4.1
6.4 Shared Memory Services 6.4.1 viMemAlloc(vi, size, offset) 6.4.2 viMemAllocEx(vi, size, offset64) Purpose Allocate memory from a device’s memory region. Parameters Name Direction Type Description vi IN ViSession Unique logical identifier to a session. size IN ViBusSize Specifies the size of the allocation. offset or offset64 OUT ViBusAddress or ViBusAddress64 Returns the offset of the allocated device memory. Return Values Type ViStatus This is the operational return status. It returns either a completion code or an error code as follows. Completion Code Description VI_SUCCESS Operation completed successfully. Error Codes Description VI_ERROR_INV_SESSION VI_ERROR_INV_OBJECT The given session or object reference is invalid (both are the same value). VI_ERROR_NSUP_OPER The given vi does not support this operation. VI_ERROR_RSRC_LOCKED Specified operation could not be performed because the resource identified by vi has been locked for this kind of access. VI_ERROR_INV_SIZE Invalid size specified. VI_ERROR_ALLOC Unable to allocate shared memory block of the requested size. VI_ERROR_MEM_NSHARED The device does not export any memory. Description This operation returns an offset into a device’s memory region that has been allocated for use by this session. If the device to which the given vi refers is located on the local interface card, the memory can be allocated either on the device itself or on the computer’s system memory. Related Items See the INSTR resource description. Also see viMemFree() and viMemFreeEx(). Implementation Requirements OBSERVATION 6.4.1
vpp43_2017-10-17.docx