summaryrefslogtreecommitdiff
path: root/util/alternatives/README
diff options
context:
space:
mode:
authorFreya Murphy <freya@freyacat.org>2025-03-25 17:36:52 -0400
committerFreya Murphy <freya@freyacat.org>2025-03-25 17:38:22 -0400
commit6af21e6a4f2251e71353562d5df7f376fdffc270 (patch)
treede20c7afc9878422c81e34f30c6b010075e9e69a /util/alternatives/README
downloadcomus-6af21e6a4f2251e71353562d5df7f376fdffc270.tar.gz
comus-6af21e6a4f2251e71353562d5df7f376fdffc270.tar.bz2
comus-6af21e6a4f2251e71353562d5df7f376fdffc270.zip
initial checkout from wrc
Diffstat (limited to 'util/alternatives/README')
-rw-r--r--util/alternatives/README31
1 files changed, 31 insertions, 0 deletions
diff --git a/util/alternatives/README b/util/alternatives/README
new file mode 100644
index 0000000..ae4dfbe
--- /dev/null
+++ b/util/alternatives/README
@@ -0,0 +1,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.