osfmk/man/MO_change_attributes.html
Function - Modify caller-specified subset of attributes representing target memory object.
**kern\_return\_t memory\_object\_change\_attributes**** (memory\_object\_control\_t **memory\_control,** memory\_object\_flavor\_t **flavor,** memory\_object\_info\_t **attributes,** attributes **attributes\_count,** mach\_port\_t **reply\_to** );**
memory_control[in memory-cache-control send right] The memory cache control port to be used by the memory manager for cache management requests. This port is provided by the kernel in a memory_object_init or memory_object_create call.
flavor[in scalar] The type of information to be changed. Valid values are:
MEMORY_OBJECT_PERFORMANCE_INFO Performance related attributes such as the cache indicator and the cluster size. attributes should specify a structure of type memory_object_perf_info.
MEMORY_OBJECT_BEHAVIOR_INFO Behavior related attributes such as the copy strategy and sync invalidate flag. attributes should specify a structure of type memory_object_behavior_info.
MEMORY_OBJECT_ATTRIBUTES_INFO Behavior and performance related attributes such as the copy strategy, cache indicator, and cluster size. attributes should specify a structure of type memory_object_attr_info.
attributes[pointer to in structure] New attributes.
attributes_count[in scalar] The size of the buffer (in natural-sized units).
reply_port[in reply receive (to be converted to send) right] A port to which a reply ( memory_object_change_completed ) is to be sent indicating the completion of the attribute change. Such a reply would be useful if the cache attribute is turned off, since such a change, if the memory object is no longer mapped, may result in the object being terminated.
The memory_object_change_attributes function sets various attributes of the specified memory object.
Only generic errors apply.
Functions: memory_object_change_completed, memory_object_get_attributes, memory_object_create.
Data Structures: memory_object_perf_info, memory_object_attr_info.