lock_global_memory


void* lock_global_memory(handle memory)

This function locks a global object and returns a pointer to that object.

Parameters

handle memory

The handle of the global memory being locked.

Return

void*

A pointer to the global memory or null if an error occurred.

Notes

The handle of a fixed object is a pointer to that object. fixed objects have a lock count of zero.

moveable objects have an associated lock count - which is initially zero. Calling this function increments the lock count. The function unlock_global_memory decrements the lock count. Locked memory is not moved or discarded unless it is reallocated.