Function descriptors within a session (Server)

When you pass a session-duration connection descriptor to one of the Fastpath look-up functions, the look-up function allocates a function descriptor with a PER_SESSION memory duration, called a session-duration function descriptor. The session-duration function descriptor remains allocated until the session ends. In this case, all UDRs within the session can access the cached function descriptor.

For a list of Fastpath look-up functions, see Fastpath look-up functions.
Important: The session-duration connection descriptor and session-duration function descriptor are advanced features of the . They can adversely affect your UDR if you use them incorrectly. In addition, session-duration function descriptors require named memory to store the pointers to function descriptors. Without named memory, UDRs cannot share these pointers. Named memory is also an advanced feature of the . Use a session-duration function descriptor only when a regular function descriptor cannot perform the task you need done.
The following table summarizes the memory operations for a session-duration function descriptor in a C UDR.
Memory duration Memory operation Function name
PER_SESSION Constructor mi_cast_get(), mi_func_desc_by_typeid(), mi_routine_get(), mi_routine_get_by_typeid(), mi_td_cast_get()

When passed a session-duration connection descriptor instead of a public connection descriptor

PER_SESSION Destructor mi_routine_end()

When the session ends