1*0f4c859eSApple OSS Distributions<h2>memory_object_synchronize</h2> 2*0f4c859eSApple OSS Distributions<hr> 3*0f4c859eSApple OSS Distributions<p> 4*0f4c859eSApple OSS Distributions<strong>Server Interface</strong> - Forward a client's request to synchronize data with its image in backing store. 5*0f4c859eSApple OSS Distributions<h3>SYNOPSIS</h3> 6*0f4c859eSApple OSS Distributions<pre> 7*0f4c859eSApple OSS Distributions<strong>kern_return_t memory_object_synchronize</strong> 8*0f4c859eSApple OSS Distributions <strong>(memory_object_t</strong> <var>memory_object</var>, 9*0f4c859eSApple OSS Distributions <strong>memory_object_control_t</strong> <var>memory_control</var>, 10*0f4c859eSApple OSS Distributions <strong>vm_offset_t</strong> <var>offset</var>, 11*0f4c859eSApple OSS Distributions <strong>vm_offset_t</strong> <var>length</var>, 12*0f4c859eSApple OSS Distributions <strong>memory_object</strong> <var>sync_flags</var><strong>);</strong> 13*0f4c859eSApple OSS Distributions 14*0f4c859eSApple OSS Distributions 15*0f4c859eSApple OSS Distributions<strong>kern_return_t seqnos_memory_object_synchronize</strong> 16*0f4c859eSApple OSS Distributions <strong>(memory_object_t</strong> <var>memory_object</var>, 17*0f4c859eSApple OSS Distributions <strong>mach_port_seqno_t</strong> <var>seqno</var>, 18*0f4c859eSApple OSS Distributions <strong>memory_object_control_t</strong> <var>memory_control</var>, 19*0f4c859eSApple OSS Distributions <strong>vm_offset_t</strong> <var>offset</var>, 20*0f4c859eSApple OSS Distributions <strong>vm_offset_t</strong> <var>length</var>, 21*0f4c859eSApple OSS Distributions <strong>memory_object</strong> <var>sync_flags</var><strong>);</strong> 22*0f4c859eSApple OSS Distributions</pre> 23*0f4c859eSApple OSS Distributions<h3>PARAMETERS</h3> 24*0f4c859eSApple OSS Distributions<dl> 25*0f4c859eSApple OSS Distributions<p> 26*0f4c859eSApple OSS Distributions<dt> <var>memory_object</var> 27*0f4c859eSApple OSS Distributions<dd> 28*0f4c859eSApple OSS Distributions[in abstract-memory-object (receive) right] 29*0f4c859eSApple OSS DistributionsThe abstract memory 30*0f4c859eSApple OSS Distributionsobject port that represents the memory object data. 31*0f4c859eSApple OSS Distributions<p> 32*0f4c859eSApple OSS Distributions<dt> <var>seqno</var> 33*0f4c859eSApple OSS Distributions<dd> 34*0f4c859eSApple OSS Distributions[in scalar] 35*0f4c859eSApple OSS DistributionsThe sequence number of this message relative to the abstract 36*0f4c859eSApple OSS Distributionsmemory object port. 37*0f4c859eSApple OSS Distributions<p> 38*0f4c859eSApple OSS Distributions<dt> <var>memory_control</var> 39*0f4c859eSApple OSS Distributions<dd> 40*0f4c859eSApple OSS Distributions[in memory-cache-control send right] 41*0f4c859eSApple OSS DistributionsThe memory cache control port 42*0f4c859eSApple OSS Distributionsto be used for a response by the memory manager. If the memory 43*0f4c859eSApple OSS Distributionsobject has been supplied to more than one kernel, this parameter 44*0f4c859eSApple OSS Distributionsidentifies the kernel that is making the call. 45*0f4c859eSApple OSS Distributions<p> 46*0f4c859eSApple OSS Distributions<dt> <var>offset</var> 47*0f4c859eSApple OSS Distributions<dd> 48*0f4c859eSApple OSS Distributions[in scalar] 49*0f4c859eSApple OSS DistributionsThe offset within the memory object. 50*0f4c859eSApple OSS Distributions<p> 51*0f4c859eSApple OSS Distributions<dt> <var>length</var> 52*0f4c859eSApple OSS Distributions<dd> 53*0f4c859eSApple OSS Distributions[in scalar] 54*0f4c859eSApple OSS DistributionsThe number of bytes cleaned or flushed, starting at <var>offset</var>. 55*0f4c859eSApple OSS DistributionsThe number converts to an integral number of virtual pages. 56*0f4c859eSApple OSS Distributions<p> 57*0f4c859eSApple OSS Distributions<dt> <var>sync_flags</var> 58*0f4c859eSApple OSS Distributions<dd> 59*0f4c859eSApple OSS Distributions[in scalar] 60*0f4c859eSApple OSS DistributionsThe bit-wise OR of flags affecting the synchronization. 61*0f4c859eSApple OSS Distributions<dl> 62*0f4c859eSApple OSS Distributions<p> 63*0f4c859eSApple OSS Distributions<dt> <strong>VM_SYNC_INVALIDATE</strong> 64*0f4c859eSApple OSS Distributions<dd> 65*0f4c859eSApple OSS DistributionsFlushes pages in the range. Only precious pages are returned 66*0f4c859eSApple OSS Distributionsto the memory manager. 67*0f4c859eSApple OSS Distributions<p> 68*0f4c859eSApple OSS Distributions<dt> <strong>VM_SYNC_SYNCHRONOUS</strong> 69*0f4c859eSApple OSS Distributions<dd> 70*0f4c859eSApple OSS DistributionsWrites dirty and precious pages back to the memory manager, 71*0f4c859eSApple OSS Distributionswaits for pages to reach backing storage. 72*0f4c859eSApple OSS Distributions<p> 73*0f4c859eSApple OSS Distributions<dt> <strong>VM_SYNC_ASYNCHRONOUS</strong> 74*0f4c859eSApple OSS Distributions<dd> 75*0f4c859eSApple OSS DistributionsWrites dirty and precious pages back to the memory manager, 76*0f4c859eSApple OSS Distributionsreturns without waiting for pages to reach backing storage. 77*0f4c859eSApple OSS Distributions</dl> 78*0f4c859eSApple OSS Distributions</dl> 79*0f4c859eSApple OSS Distributions<h3>DESCRIPTION</h3> 80*0f4c859eSApple OSS Distributions<p> 81*0f4c859eSApple OSS DistributionsA <strong>memory_object_synchronize</strong> function is called as the 82*0f4c859eSApple OSS Distributionsresult of a kernel 83*0f4c859eSApple OSS Distributionsmessage indicating that a client wishes to synchronize the contents 84*0f4c859eSApple OSS Distributionsof a range of a 85*0f4c859eSApple OSS Distributionsmemory object with its backing storage image. This message would have been 86*0f4c859eSApple OSS Distributionspreceded by <strong>memory_object_data_return</strong> messages cleaning 87*0f4c859eSApple OSS Distributionsor flushing the 88*0f4c859eSApple OSS Distributionsspecified range. 89*0f4c859eSApple OSS Distributions<p> 90*0f4c859eSApple OSS DistributionsDepending on the client's supplied <var>sync_flags</var>, the manager waits 91*0f4c859eSApple OSS Distributionsfor the pages 92*0f4c859eSApple OSS Distributionsto reach the desired state and then replies with 93*0f4c859eSApple OSS Distributions<strong>memory_object_synchronize_completed</strong> at which time the 94*0f4c859eSApple OSS Distributionsclient returns from its <strong>vm_msync</strong> call. Multiple 95*0f4c859eSApple OSS Distributionssynchronize requests may be outstanding at a time but they will not overlap. 96*0f4c859eSApple OSS Distributions<h3>RETURN VALUES</h3> 97*0f4c859eSApple OSS Distributions<p> 98*0f4c859eSApple OSS DistributionsOnly generic errors apply. 99*0f4c859eSApple OSS Distributions<h3>RELATED INFORMATION</h3> 100*0f4c859eSApple OSS Distributions<p> 101*0f4c859eSApple OSS DistributionsFunctions: 102*0f4c859eSApple OSS Distributions<a href="vm_msync.html"><strong>vm_msync</strong></a>, 103*0f4c859eSApple OSS Distributions<a href="MO_SY_completed.html"><strong>memory_object_synchronize_completed</strong></a>, 104*0f4c859eSApple OSS Distributions<a href="memory_object_data_return.html"><strong>memory_object_data_return</strong></a>, 105*0f4c859eSApple OSS Distributions<a href="memory_object_server.html"><strong>memory_object_server</strong></a>, 106*0f4c859eSApple OSS Distributions<a href="SMO_server.html"><strong>seqnos_memory_object_server</strong></a>. 107