Changeset 32ff43e6 in mainline for src/mm/buddy.c


Ignore:
Timestamp:
2005-09-28T13:00:11Z (19 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
2a9543d
Parents:
a58db280
Message:

Redeclare eraly_malloc() with attribute ((malloc)) to improve optimizations.

Reorganize #include's in scheduler.c.

Buddy system improvements.
Make buddy_system_free() explicitly invalidate order of blocks before they are coalesced.
Add some assertions.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/mm/buddy.c

    ra58db280 r32ff43e6  
    4949        int i;
    5050
     51        ASSERT(max_order < BUDDY_SYSTEM_INNER_BLOCK);
     52
    5153        ASSERT(op->find_buddy);
    5254        ASSERT(op->set_order);
     
    167169       
    168170        if (buddy && i != b->max_order - 1) {
     171
     172                ASSERT(b->op->get_order(buddy) == i);
     173               
    169174                /*
    170175                 * Remove buddy from the list of order i.
     
    173178               
    174179                /*
     180                 * Invalidate order of both block and buddy.
     181                 */
     182                b->op->set_order(block, BUDDY_SYSTEM_INNER_BLOCK);
     183                b->op->set_order(buddy, BUDDY_SYSTEM_INNER_BLOCK);
     184               
     185                /*
    175186                 * Coalesce block and buddy into one block.
    176187                 */
Note: See TracChangeset for help on using the changeset viewer.