Next: , Up: External Memory Management

6.1 Memory Object Server

— Function: boolean_t memory_object_server (msg_header_t *in_msg, msg_header_t *out_msg)
— Function: boolean_t memory_object_default_server (msg_header_t *in_msg, msg_header_t *out_msg)
— Function: boolean_t seqnos_memory_object_server (msg_header_t *in_msg, msg_header_t *out_msg)
— Function: boolean_t seqnos_memory_object_default_server (msg_header_t *in_msg, msg_header_t *out_msg)

A memory manager is a server task that responds to specific messages from the kernel in order to handle memory management functions for the kernel.

In order to isolate the memory manager from the specifics of message formatting, the remote procedure call generator produces a procedure, memory_object_server, to handle a received message. This function does all necessary argument handling, and actually calls one of the following functions: memory_object_init, memory_object_data_write, memory_object_data_return, memory_object_data_request, memory_object_data_unlock, memory_object_lock_completed, memory_object_copy, memory_object_terminate. The default memory manager may get two additional requests from the kernel: memory_object_create and memory_object_data_initialize. The remote procedure call generator produces a procedure memory_object_default_server to handle those functions specific to the default memory manager.

The seqnos_memory_object_server and seqnos_memory_object_default_server differ from memory_object_server and memory_object_default_server in that they supply message sequence numbers to the server interfaces. They call the seqnos_memory_object_* functions, which complement the memory_object_* set of functions.

The return value from the memory_object_server function indicates that the message was appropriate to the memory management interface (returning TRUE), or that it could not handle this message (returning FALSE).

The in_msg argument is the message that has been received from the kernel. The out_msg is a reply message, but this is not used for this server.

The function returns TRUE to indicate that the message in question was applicable to this interface, and that the appropriate routine was called to interpret the message. It returns FALSE to indicate that the message did not apply to this interface, and that no other action was taken.