INtime SDK Help
CreateGlobalRtMemoryObject
INtime SDK v6 > About INtime > INtime Kernel > Global objects > CreateGlobalRtMemoryObject

Creates a memory area on a remote node indicated by the LOCATION parameter and returns a handle to a reference object for that area.

#include <rt.h> 

RTHANDLE CreateGlobalRtMemoryObject(  
    LOCATION hLoc, 
    UINT_32 cbSize, 
    UINT_16 Flags
);

Parameters

hLoc
The location where the object is to be created.
cbSize
The size in bytes of the memory object to be created.
Flags
The flag REFCOUNT indicates that this object is to be created as a reference-counted object.

Remarks

Creates a memory object of size cbSize on the node indicated by the LOCATION parameter and returns a reference to that memory object. The value REFCOUNT for the Flags parameter indicates that the memory object should be created with a reference counter. If the memory object is not created with a reference counter, it is considered to be owned by the calling process, even though it is resident on the remote node. Thus if the local process is deleted the remote node's Global Objects Manager process is responsible for deleting the remote memory object. In the case of a reference-counted memory object the object is only deleted after the reference count decrements to zero.

Return Values

A valid reference object handle
Success.
BAD_RTHANDLE
Failure. The function sets GetLastRtError to one of these values:
E_RESOURCE_LIMIT Insufficient resources are available to signal the remote node.
E_SLOT The maximum number of objects on the local node or the remote node has been exceeded.
E_MEM Insufficient physical memory is available to create the reference object or the remote object.
E_INVALID_ADDRESS (0x00E2) The address provided for hLoc is not a valid address.

Requirements

Versions Defined in Include Link to
INtime 4.0 intime/rt/include/rt.h rt.h rt.lib
See Also