Back to Darwin Xnu

Memory Object Attr Info

osfmk/man/memory_object_attr_info.html

latest2.5 KB
Original Source

memory_object_attr_info


Structure - Specifies memory object's behavior attributes.

SYNOPSIS

**struct memory\_object\_attr\_info**** { ****memory\_object\_copy\_strategy\_t** copy\_strategy **;**** vm\_offset\_t **cluster\_size** ; ****boolean\_t** may\_cache **;**** boolean\_t **temporary** ; ****};**** typedef struct memory\_object\_attr\_info\* memory\_object\_attr\_info\_t;**

FIELDS

copy_strategyHow the kernel should handle copying of regions associated with the memory object. The copy strategy cannot be changed once an object is initialized. Valid values are:

MEMORY_OBJECT_COPY_NONE Use normal procedure when copying the memory object's data. Normally, the kernel requests each page with read access, copies the data, and then (optionally) flushes the data.

MEMORY_OBJECT_COPY_CALL Call the memory manager when a copy operation is necessary.

MEMORY_OBJECT_COPY_DELAY Use copy-on-write technique. This strategy allows the kernel to efficiently copy large amounts of data and guarantees that the memory manager will not externally modify the data. It is the most commonly used copy strategy.

MEMORY_OBJECT_COPY_TEMPORARY All changes are made in memory and the memory manager does not need to see them.

MEMORY_OBJECT_COPY_SYMMETRIC The memory manager does not change the data, does not need to see any changes to the data, and will prevent the object from being mapped more than once. Currently, this strategy should be restricted to use by the kernel.

cluster_sizeThe memory object's perferred cluster size (in bytes). This value may affect the number of pages transferred in a given paging operation.

may_cacheCache indicator. If true, the kernel can cache data associated with the memory object (keep the memory object active) even if no virtual memory references to it remain.

temporaryIf TRUE, when the last mapping to the object is released, the kernel destroys the object without returning any resident pages.

DESCRIPTION

The memory_object_attr_info structure defines behavior and performance relevant memory object attributes.

Functions: memory_object_get_attributes, memory_object_change_attributes, vm_region, memory_object_synchronize, vm_set_default_memory_manager, vm_msync.