• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.5.8/xnu-1228.15.4/osfmk/vm/

Lines Matching refs:copy

15  * Please obtain a copy of the License at
36 * Permission to use, copy, modify and distribute this software and its
149 * hold changed pages after a copy-on-write operation.
156 * The "copy" field refers to a virtual memory object
159 * of copy-on-write optimization.
469 vm_object_template.copy = VM_OBJECT_NULL;
1291 * copy. The reference we hold on the shadow must be dropped
1297 if (shadow_object->copy == object)
1298 shadow_object->copy = VM_OBJECT_NULL;
2036 * as copy-on-write). The pages in the
2045 * If the copy is completed successfully, KERN_SUCCESS is
2050 * hard errors during the copy operation.
2054 * new object, starting at a zero offset, are a copy
2082 * Prevent destruction of the source object while we copy.
2233 * copy
2270 * If the copy is successful, the copy is returned in
2306 * Symmetric copy strategy.
2346 * user-managed copy algorithm.
2353 * If the copy is successful, KERN_SUCCESS is returned.
2367 vm_object_t copy;
2372 * If a copy is already in progress, wait and retry.
2380 * us to use the copy that the currently requesting
2393 * that we want a copy for src_object. (Note that we cannot
2403 * which represents a copy of the src object.
2416 * Wait for the copy to arrive.
2425 assert(src_object->copy != VM_OBJECT_NULL);
2426 copy = src_object->copy;
2427 if (!vm_object_lock_try(copy)) {
2436 if (copy->size < src_offset+size)
2437 copy->size = src_offset+size;
2439 if (!copy->pager_ready)
2443 * Return the copy.
2445 *_result_object = copy;
2446 vm_object_unlock(copy);
2449 /* Wait for the copy to be ready. */
2451 vm_object_lock(copy);
2452 while (!copy->pager_ready) {
2453 vm_object_sleep(copy, VM_OBJECT_EVENT_PAGER_READY, THREAD_UNINT);
2455 vm_object_unlock(copy);
2471 * the asymmetric copy-on-write algorithm.
2499 * Perform an asymmetric copy-on-write, as follows:
2500 * Create a new object, called a "copy object" to hold
2501 * pages modified by the new mapping (i.e., the copy,
2504 * the copy object. If the original mapping does not
2505 * change a page, it may be used read-only by the copy.
2506 * Record the copy object in the original object.
2509 * the copy object.
2510 * Mark the new mapping (the copy object) copy-on-write.
2511 * This makes the copy object itself read-only, allowing
2516 * The copy-on-write is said to be assymetric because the original
2517 * object is *not* marked copy-on-write. A copied page is pushed
2518 * to the copy object, regardless which party attempted to modify
2521 * Repeated asymmetric copy operations may be done. If the
2522 * original object has not been changed since the last copy, its
2523 * copy object can be reused. Otherwise, a new copy object can be
2524 * inserted between the original object and its previous copy
2525 * object. Since any copy object is read-only, this cannot affect
2526 * affect the contents of the previous copy object.
2528 * Note that a copy object is higher in the object tree than the
2529 * original object; therefore, use of the copy object recorded in
2549 * copy operation.
2552 old_copy = src_object->copy;
2586 * Determine whether the old copy object has
2596 * the existing copy-object if
2611 * We can't perform a delayed copy if any of the
2659 * copy object will be large enough to back either the
2660 * old copy object or the new mapping.
2678 * The copy-object is always made large enough to
2698 * We now have the src object locked, and the new copy object
2699 * allocated and locked (and potentially the old copy locked).
2701 * a delayed copy, as the situation may have changed.
2703 * Specifically, we can't perform a delayed copy if any of the
2727 * Make the old copy-object shadow the new one.
2753 * Point the new copy at the existing object.
2762 src_object->copy = new_copy;
2767 "vm_object_copy_delayed: used copy object %X for source %X\n",
2777 * Perform a copy according to the source object's
2806 * The copy strategy is only valid if the memory manager
2832 * Use the appropriate copy strategy.
2846 /* fall thru when delayed copy not allowed */
2912 * do more than just set "needs_copy" to handle the copy-on-write...
2924 source->shadow->copy == VM_OBJECT_NULL))
2988 * requests (notably virtual copy operations, but also data or
3195 /* copy strategy invalid until set by memory manager */
3559 * XXX - If the shadow offset is not 0 then a bit copy is needed
3595 (object->shadow->copy != backing_object));
3665 * Backing object might have had a copy pointer
3668 if (backing_object->copy == object) {
3669 backing_object->copy = VM_OBJECT_NULL;
3833 * The backing object can't be a copy-object:
3834 * the shadow_offset for the copy-object must stay
3843 backing_object->shadow->copy == backing_object) {
4267 * . has a copy elsewhere
4275 (prev_object->copy != VM_OBJECT_NULL) ||
4461 printf(", copy=0x%x", object->copy);
4509 printf(", copy=0x%x", object->copy);
5184 assert(object->copy == VM_OBJECT_NULL);
5406 assert(object->copy == VM_OBJECT_NULL);
5706 object1->copy || object1->shadow || object1->shadowed ||
5709 * We don't deal with copy or shadow objects (yet).
5733 object2->copy || object2->shadow || object2->shadowed ||
5745 * while we copy object2 to object1.
5851 /* there should be no "copy" */
5852 assert(!object1->copy);
5853 assert(!object2->copy);