summaryrefslogtreecommitdiff
path: root/util/alternatives/README
blob: ae4dfbebcc7f04bf0e48b75bcfc67178871f5d0b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
This directory contains "alternative" versions of some pieces of the system. 

Things included here:

    Make.mk
        This version of the Makefile fragment puts the utility programs
        in build/util instead of in the top-level directory.

    kmem.c
        A version of the memory allocator that works with blocks of memory
        that aren't exactly one page in length. During initialilzation, it
        just adds each memory region identified during the boot process by
        calls to the BIOS; as pages are requested, they are carved out of
        these large blocks. The freelist is ordered by starting block
        address, and allocation uses a first-fit strateby.

        The allocation function has this prototype:

            void *km_page_alloc( unsigned int count );

        This allows the allocation of multiple contiguous pages. As pages
        are freed, they are merged back into the freelist, and adjacent
        free pages are coalesced into single, larger blocks.

    lib.c
        This file pulls in all the individual .c files for the common
        library functions in the lib/ directory. It is intended as an
        alternative to having the libk.a archive file for the kernel;
        instead of linking against that library, the lib.o file can
        just be provided to the linker when the kernel is created,
        and all the common library functions will be available.