Operator Reference

create_memory_block_extern_copyT_create_memory_block_extern_copyCreateMemoryBlockExternCopyCreateMemoryBlockExternCopycreate_memory_block_extern_copy (Operator)

create_memory_block_extern_copyT_create_memory_block_extern_copyCreateMemoryBlockExternCopyCreateMemoryBlockExternCopycreate_memory_block_extern_copy — Create a memory block from an external pointer by copying.

Signature

create_memory_block_extern_copy( : : Pointer, Size : MemoryBlockHandle)

Herror T_create_memory_block_extern_copy(const Htuple Pointer, const Htuple Size, Htuple* MemoryBlockHandle)

void CreateMemoryBlockExternCopy(const HTuple& Pointer, const HTuple& Size, HTuple* MemoryBlockHandle)

void HMemoryBlock::HMemoryBlock(void* Pointer, Hlong Size)

void HMemoryBlock::CreateMemoryBlockExternCopy(void* Pointer, Hlong Size)

static void HOperatorSet.CreateMemoryBlockExternCopy(HTuple pointer, HTuple size, out HTuple memoryBlockHandle)

public HMemoryBlock(IntPtr pointer, int size)

void HMemoryBlock.CreateMemoryBlockExternCopy(IntPtr pointer, int size)

def create_memory_block_extern_copy(pointer: int, size: int) -> HHandle

Description

create_memory_block_extern_copycreate_memory_block_extern_copyCreateMemoryBlockExternCopyCreateMemoryBlockExternCopycreate_memory_block_extern_copy creates a memory block by copying bytes and returns its handle MemoryBlockHandleMemoryBlockHandleMemoryBlockHandlememoryBlockHandlememory_block_handle. PointerPointerPointerpointerpointer is a data pointer to the beginning of the memory to be copied. SizeSizeSizesizesize determines the number of bytes to be copied and with that the size of the memory block in bytes. Note that the memory copied by this operator is released when deleting MemoryBlockHandleMemoryBlockHandleMemoryBlockHandlememoryBlockHandlememory_block_handle, whereas the original memory in PointerPointerPointerpointerpointer that is copied from is not released.

Execution Information

  • Multithreading type: reentrant (runs in parallel with non-exclusive operators).
  • Multithreading scope: global (may be called from any thread).
  • Processed without parallelization.

This operator returns a handle. Note that the state of an instance of this handle type may be changed by specific operators even though the handle is used as an input parameter by those operators.

Parameters

PointerPointerPointerpointerpointer (input_control)  pointer HTupleintHTupleHtuple (integer) (IntPtr) (Hlong) (Hlong)

Data pointer of the memory block.

SizeSizeSizesizesize (input_control)  integer HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Size of the memory block.

MemoryBlockHandleMemoryBlockHandleMemoryBlockHandlememoryBlockHandlememory_block_handle (output_control)  memory_block HMemoryBlock, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Handle of the memory block.

Result

If the parameters are valid, the operator create_memory_block_extern_copycreate_memory_block_extern_copyCreateMemoryBlockExternCopyCreateMemoryBlockExternCopycreate_memory_block_extern_copy returns the value 2 ( H_MSG_TRUE) . If necessary, an exception is raised.

Possible Successors

get_memory_block_ptrget_memory_block_ptrGetMemoryBlockPtrGetMemoryBlockPtrget_memory_block_ptr, compare_memory_blockcompare_memory_blockCompareMemoryBlockCompareMemoryBlockcompare_memory_block, memory_block_to_imagememory_block_to_imageMemoryBlockToImageMemoryBlockToImagememory_block_to_image, write_memory_blockwrite_memory_blockWriteMemoryBlockWriteMemoryBlockwrite_memory_block

Alternatives

create_memory_block_externcreate_memory_block_externCreateMemoryBlockExternCreateMemoryBlockExterncreate_memory_block_extern

Module

Foundation