Changeset 4841104 in mainline for src/mm/frame.c


Ignore:
Timestamp:
2005-09-23T20:44:35Z (19 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
adecf496
Parents:
23443b2
Message:

Physical memory management work.
Add "attribute ((packed))" to frame_t so that it takes up less space.
Note that this is essential as there is lot of these structures.
Remove busy list from zone_t as it is redundant.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/mm/frame.c

    r23443b2 r4841104  
    116116        frame->refcount++;
    117117        list_remove(tmp);                       /* remove frame from free_head */
    118         list_append(tmp, &zone->busy_head);     /* append frame to busy_head */
    119118        zone->free_count--;
    120119        zone->busy_count++;
     
    181180
    182181        if (!--frame->refcount) {
    183                 list_remove(&frame->link);                      /* remove frame from busy_head */
    184182                list_append(&frame->link, &zone->free_head);    /* append frame to free_head */
    185183                zone->free_count++;
     
    196194 *
    197195 * Find respective frame structrue for supplied addr.
    198  * Increment frame reference count and move the frame structure to busy list.
     196 * Increment frame reference count and remove the frame structure from free list.
    199197 *
    200198 * @param addr Address of the frame to be marked. It must be a multiple of FRAME_SIZE.
     
    242240
    243241                list_remove(&frame->link);                      /* remove frame from free_head */
    244                 list_append(&frame->link, &zone->busy_head);    /* append frame to busy_head */
    245242                zone->free_count--;
    246243                zone->busy_count++;
     
    314311
    315312                z->busy_count = 0;
    316                 list_initialize(&z->busy_head);
    317313               
    318314                z->frames = (frame_t *) malloc(cnt * sizeof(frame_t));
Note: See TracChangeset for help on using the changeset viewer.