Rev 534 | Rev 538 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 534 | Rev 537 | ||
---|---|---|---|
Line 52... | Line 52... | ||
52 | link_t link; /**< link to previous and next zone */ |
52 | link_t link; /**< link to previous and next zone */ |
53 | 53 | ||
54 | spinlock_t lock; /**< this lock protects everything below */ |
54 | spinlock_t lock; /**< this lock protects everything below */ |
55 | __address base; /**< physical address of the first frame in the frames array */ |
55 | __address base; /**< physical address of the first frame in the frames array */ |
56 | frame_t *frames; /**< array of frame_t structures in this zone */ |
56 | frame_t *frames; /**< array of frame_t structures in this zone */ |
57 | link_t free_head; /**< list of free frame_t structures */ |
- | |
58 | count_t free_count; /**< number of frame_t structures in free list */ |
57 | count_t free_count; /**< number of frame_t structures in free list */ |
59 | count_t busy_count; /**< number of frame_t structures not in free list */ |
58 | count_t busy_count; /**< number of frame_t structures not in free list */ |
60 | 59 | ||
61 | buddy_system_t * buddy_system; /**< buddy system for the zone */ |
60 | buddy_system_t * buddy_system; /**< buddy system for the zone */ |
62 | int flags; |
61 | int flags; |
63 | }; |
62 | }; |
64 | 63 | ||
65 | struct frame { |
64 | struct frame { |
66 | count_t refcount; /**< when == 0, the frame is in free list */ |
65 | count_t refcount; /**< tracking of shared frames */ |
67 | link_t link; /**< link to zone free list when refcount == 0 */ |
- | |
68 | __u8 buddy_order; /**< buddy system block order */ |
66 | __u8 buddy_order; /**< buddy system block order */ |
69 | link_t buddy_link; /**< link to the next free block inside one order*/ |
67 | link_t buddy_link; /**< link to the next free block inside one order */ |
70 | }; |
68 | }; |
71 | 69 | ||
72 | struct region { |
70 | struct region { |
73 | __address base; |
71 | __address base; |
74 | size_t size; |
72 | size_t size; |