Some more progress on resource management and boot up.

This commit is contained in:
Bahadir Balban
2009-07-29 13:32:38 +03:00
parent 2b0ea24e94
commit dd8f773f10
17 changed files with 950 additions and 86 deletions

View File

@@ -28,6 +28,12 @@ void *alloc_bootmem(int size, int alignment)
if (!is_aligned(cursor, alignment))
/* Align the cursor to alignment */
cursor = align_up(cursor, alignment);
/* Align to 4 byte by default */
} else if (size >= 4) {
/* And cursor is not aligned */
if (!is_aligned(cursor, 4))
/* Align the cursor to alignment */
cursor = align_up(cursor, 4);
}
/* Allocate from cursor */