Changeset ad64a2d in mainline for generic/src/mm/frame.c
- Timestamp:
- 2006-03-19T21:51:31Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 8d25b44
- Parents:
- 7c7aae16
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
generic/src/mm/frame.c
r7c7aae16 rad64a2d 538 538 } 539 539 /* Copy frames from both zones to preserve full frame orders, 540 * parents etc. Set all fr ames with refcount=0 to 1, because540 * parents etc. Set all free frames with refcount=0 to 1, because 541 541 * we add all free frames to buddy allocator later again, clear 542 * order to 0. 542 * order to 0. Don't set busy frames with refcount=0, as they 543 * will not be reallocated during merge and it would make later 544 * problems with allocation/free. 543 545 */ 544 546 for (i=0; i<z1->count; i++) … … 548 550 z->frames[z2idx] = z2->frames[i]; 549 551 } 550 for (i=0; i < z->count; i++) { 551 if (!z->frames[i].refcount) { 552 i = 0; 553 while (i < z->count) { 554 if (z->frames[i].refcount) { 555 /* skip busy frames */ 556 i += 1 << z->frames[i].buddy_order; 557 } else { /* Free frames, set refcount=1 */ 558 /* All free frames have refcount=0, we need not 559 * to check the order */ 552 560 z->frames[i].refcount = 1; 553 561 z->frames[i].buddy_order = 0; 562 i++; 554 563 } 555 564 }
Note:
See TracChangeset
for help on using the changeset viewer.