Handle management

Handle management has been introduced to allocate unique in the whole system identifiers that are necessary to right discern system objects. This module is used by most products of the SpaceShadow.

Special type HANDLE has been introduced to store the handle values. Its size is either 16 or 32-bits and depends on the maximal number of handles. Only a determined maximum number of handles can be allocated in the system. It is defined by ST_MAX_HANDLE_COUNT constant. This constant must be greater than 0. According to the specified value, handle management module uses a memory of size which is a multiple of the given value and size of PVOID type.

The stHandleCheck is an additional extension. It helps to check if the handle is free or not. It is excluded from compilation, by default. It may be used for testing and debugging. To make this function available, set the ST_HANDLE_CHECK_FUNC to 1.

All of functions like stHandleAlloc, stHandleRelease, stHandleInfo, stHandleInit are used by SpaceShadow products, and should not be used by user. It may changed in further product releases.

SpaceShadow documentation