Click or drag to resize
SoCpuBufferObjectSetSize Method

Sets the size in bytes of the buffer object.

Namespace: OIV.Inventor.Devices
Assembly: OIV.Inventor.Base (in OIV.Inventor.Base.dll) Version: 9.9.13.0 (9.9.13.0)
Syntax
public override bool SetSize(
	ulong size
)

Parameters

size
Type: SystemUInt64

The size in bytes of the memory to allocate.

Return Value

Type: Boolean

True if allocation succeeded.

Remarks

In other words, a request to allocate size bytes of CPU memory. Returns true if the allocation succeeded. The memory is owned by the buffer object and will be freed when the buffer object is destroyed.

If the requested size is the same as the current size, this method does nothing and returns true. If there is existing memory that is owned by the buffer object, that memory is released. If the requested size is zero, the buffer object is now empty. By default memory allocations have the maximum possible alignment to allow use with (for example) SSE instructions.

By default memory is managed using the new/delete operators. On Microsoft Windows platforms it is possible to use VirtualAlloc/VirtualFree instead by setting OIV_BUFFER_USE_VIRTUAL_ALLOC (see SoPreferences).

See Also