Changeset e411579 in mainline
- Timestamp:
- 2005-11-15T10:41:17Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 93354b0
- Parents:
- feb1a414
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
generic/src/mm/frame.c
rfeb1a414 re411579 602 602 link_t * zone_buddy_bisect(link_t * block) { 603 603 frame_t * frame_l, * frame_r; 604 zone_t * zone;605 604 606 605 frame_l = list_get_instance(block, frame_t, buddy_link); 607 606 608 zone = get_zone_by_frame(frame_l); 609 610 frame_r = &zone->frames[FRAME_INDEX(zone, frame_l) + 1>>(frame_l->buddy_order-1)]; 611 607 frame_r = (frame_t *) (&frame_l + (1>>frame_l->buddy_order-1)); 612 608 613 609 return &frame_r->buddy_link; … … 624 620 link_t * zone_buddy_coalesce(link_t * block_1, link_t * block_2) { 625 621 frame_t * frame1, * frame2; 626 zone_t * zone;627 622 628 623 frame1 = list_get_instance(block_1, frame_t, buddy_link); 629 624 frame2 = list_get_instance(block_2, frame_t, buddy_link); 630 625 631 zone = get_zone_by_frame(frame1); 632 633 return FRAME_INDEX(zone, frame1) < FRAME_INDEX(zone, frame2) ? block_1 : block_2; 634 626 return frame1 < frame2 ? block_1 : block_2; 635 627 } 636 628
Note:
See TracChangeset
for help on using the changeset viewer.