Changeset 2b50d7c in mainline for src/mm/frame.c
- Timestamp:
- 2005-05-28T20:13:25Z (20 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 747a2476
- Parents:
- 87cb9e2
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mm/frame.c
r87cb9e2 r2b50d7c 43 43 #include <synch/spinlock.h> 44 44 45 __u32 frames;46 __u32frames_free;45 count_t frames = 0; 46 count_t frames_free; 47 47 48 48 __u8 *frame_bitmap; 49 __u32frame_bitmap_octets;49 count_t frame_bitmap_octets; 50 50 51 51 /* … … 54 54 */ 55 55 __u8 *frame_kernel_bitmap; 56 __u32kernel_frames;57 __u32kernel_frames_free;56 count_t kernel_frames; 57 count_t kernel_frames_free; 58 58 59 59 static spinlock_t framelock; … … 69 69 frames = config.memory_size / FRAME_SIZE; 70 70 frame_bitmap_octets = frames / 8 + (frames % 8 > 0); 71 72 71 frame_bitmap = (__u8 *) malloc(frame_bitmap_octets); 73 72 if (!frame_bitmap) … … 111 110 pri_t pri; 112 111 __u8 **frame_bitmap_ptr = &frame_bitmap; 113 __u32*frames_ptr = &frames, *frames_free_ptr = &frames_free;112 count_t *frames_ptr = &frames, *frames_free_ptr = &frames_free; 114 113 115 114 if (flags & FRAME_KA) { … … 166 165 pri_t pri; 167 166 __u32 frame; 168 __u32*frames_free_ptr = &frames_free, *frames_ptr = &frames;167 count_t *frames_free_ptr = &frames_free, *frames_ptr = &frames; 169 168 __u8 **frame_bitmap_ptr = &frame_bitmap; 170 169 … … 196 195 } 197 196 } 198 else panic("frame _free: framealready free\n");199 } 200 else panic("frame _free: framenumber too big\n");197 else panic("frame already free\n"); 198 } 199 else panic("frame number too big\n"); 201 200 202 201 spinlock_unlock(&framelock); … … 212 211 pri_t pri; 213 212 __u32 frame; 214 __u32*frames_ptr = &frames, *frames_free_ptr = &frames_free;213 count_t *frames_ptr = &frames, *frames_free_ptr = &frames_free; 215 214 __u8 **frame_bitmap_ptr = &frame_bitmap; 216 215
Note:
See TracChangeset
for help on using the changeset viewer.