1 .\"
2 .\" Mach Operating System
3 .\" Copyright (c) 1991,1990 Carnegie Mellon University
4 .\" All Rights Reserved.
5 .\"
6 .\" Permission to use, copy, modify and distribute this software and its
7 .\" documentation is hereby granted, provided that both the copyright
8 .\" notice and this permission notice appear in all copies of the
9 .\" software, derivative works or modified versions, and any portions
10 .\" thereof, and that both notices appear in supporting documentation.
11 .\"
12 .\" CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
13 .\" CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
14 .\" ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
15 .\"
16 .\" Carnegie Mellon requests users of this software to return to
17 .\"
18 .\" Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
19 .\" School of Computer Science
20 .\" Carnegie Mellon University
21 .\" Pittsburgh PA 15213-3890
22 .\"
23 .\" any improvements or extensions that they make and grant Carnegie Mellon
24 .\" the rights to redistribute these changes.
25 .\"
26 .\"
27 .\" HISTORY
28 .\" $Log: memory_object_set_attributes.man,v $
29 .\" Revision 2.5 93/05/10 19:34:03 rvb
30 .\" updated
31 .\" [93/04/21 16:08:53 lli]
32 .\"
33 .\" Revision 2.4 91/05/14 17:10:33 mrt
34 .\" Correcting copyright
35 .\"
36 .\" Revision 2.3 91/02/14 14:13:29 mrt
37 .\" Changed to new Mach copyright
38 .\" [91/02/12 18:14:15 mrt]
39 .\"
40 .\" Revision 2.2 90/08/07 18:41:41 rpd
41 .\" Created.
42 .\"
43 .TH memory_object_set_attributes 2 12/19/89
44 .CM 4
45 .SH NAME
46 .nf
47 memory_object_set_attributes \- indicate how kernel should handle object
48 .SH SYNOPSIS
49 .nf
50 .ft B
51 #include <mach.h>
52
53 .nf
54 .ft B
55 kern_return_t memory_object_set_attributes(memory_control,
56 object_ready, may_cache_object,
57 copy_strategy)
58 mach_port_t
59 memory_control;
60 boolean_t object_ready;
61 boolean_t may_cache_object;
62 memory_object_copy_strategy_t
63 copy_strategy;
64
65
66 .fi
67 .ft P
68 .SH DESCRIPTION
69
70 .B memory_object_set_attributes
71 controls how the the memory object. The kernel will only make data or unlock requests when
72 the ready attribute is asserted. If the caching attribute is asserted, the
73 kernel is permitted (and encouraged) to maintain
74 cached data for this memory object even after no virtual address space
75 contains this data.
76
77 There are three possible caching strategies:
78 .B MEMORY_OBJECT_COPY_NONE
79 which specifies that nothing special should be done when data in the
80 object is copied;
81 .B MEMORY_OBJECT_COPY_CALL
82 which specifies that the
83 memory manager should be notified via a
84 .B memory_object_copy
85 call before
86 any part of the object is copied; and
87 .B MEMORY_OBJECT_COPY_DELAY
88 which
89 guarantees that the memory manager does not externally modify the data
90 so that the kernel can use its normal copy-on-write algorithms.
91 .B MEMORY_OBJECT_COPY_DELAY
92 is the strategy most commonly used.
93
94 .SH ARGUMENTS
95 .TP 15
96 .B
97 memory_control
98 The port, provided by the kernel
99 in a
100 .B memory_object_init
101 call, to which cache management requests may be issued.
102 .TP 15
103 .B
104 object_ready
105 When set, the kernel may issue new data and unlock requests on the
106 associated memory object.
107 .TP 15
108 .B
109 may_cache_object
110 If set, the kernel may keep data
111 associated with this
112 memory object, even after virtual memory references to it are gone.
113 .TP 15
114 .B
115 copy_strategy
116 How the kernel should copy regions of the associated
117 memory object.
118
119 .SH DIAGNOSTICS
120 .TP 25
121 KERN_SUCCESS
122 This routine does not receive a reply message (and consequently
123 has no return value), so only message transmission errors apply.
124
125 .SH SEE ALSO
126 .B memory_object_init, memory_object_copy, memory_object_attributes
127
Cache object: 648f3e727a5fde7d64138178328eafa8
|