Teamcenter C++ API Reference  2312
Classes | Enumerations | Functions
Teamcenter::PackedMemory Namespace Reference

Classes

class  Builder
 Provides a template class to help generating packed memory for ITK function and class methods returning OF type data. More...
 
struct  DefaultAllocator
 This is the default memory allocator used by the Builder. More...
 

Enumerations

enum  CreateMode { AllowOverride, NoOverride, NoMarking }
 Allows controlling the packing mode when creating the buffer. More...
 

Functions

size_t getAlignedSize (size_t datasize)
 

Enumeration Type Documentation

Allows controlling the packing mode when creating the buffer.

The CreateMode allows different types of packed buffers to be creates. The AllowOverride is used to not do the marked packing if the SM options has SM_option_override_packing enabled. If this is set and AllowOverride is specified, no packing will be done and the memory will be allocated in a unpacked layout (potential memory leaks). If the NoOverride is specified, the buffer will be packed and special marking will be done on all embedded allocations. the NoMarking option will pack the buffer and no marking is done on the embedded allocation. This can be used when there is no external exposure to the packed buffer and there is knowlege that the caller is freeing the buffer correctly.

Enumerator
AllowOverride 

The AllowOverride can be use to allow unpacked data to be generated.

NoOverride 

This generates packed data with special marking.

NoMarking 

Creates a packed with no marking (smallest overhead).

Definition at line 101 of file PackedMemoryBuilder.hxx.

Function Documentation

size_t Teamcenter::PackedMemory::getAlignedSize ( size_t  datasize)
inline

Calculates the alignment size to be used when allocating or creating a pointer reference. In order to not create a page fault exception, a pointer needs to be alligned according to the current processor.

Returns
The size of data that should be use to make the specified data size fall onto a page boundry.
Parameters
datasizeThe size of the buffer seeking alignment for.

Definition at line 41 of file PackedMemoryBuilder.hxx.