about summary refs log tree commit diff stats
path: root/subx/053new-segment.subx
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2019-05-09 09:25:01 -0700
committerKartik Agaram <vc@akkartik.com>2019-05-09 09:25:01 -0700
commitfbc21293299f1d5b2d108e3ee98ea4e9083965b5 (patch)
tree31c5b683cbdeee9e4b32f402a3ec3b76e769aafa /subx/053new-segment.subx
parent3ae1fd0048cb0745f570df0263a828a30315a00b (diff)
downloadmu-fbc21293299f1d5b2d108e3ee98ea4e9083965b5.tar.gz
5148
Snapshot of incomplete work to have the memory allocator use `mmap` rather
than `brk`. C tests pass, but the SubX layers are still broken.
Diffstat (limited to 'subx/053new-segment.subx')
-rw-r--r--subx/053new-segment.subx13
1 files changed, 12 insertions, 1 deletions
diff --git a/subx/053new-segment.subx b/subx/053new-segment.subx
index 1669b097..21837628 100644
--- a/subx/053new-segment.subx
+++ b/subx/053new-segment.subx
@@ -1,4 +1,15 @@
-# Create a new segment (for data) using mmap().
+# Create a new segment (pool of memory for allocating chunks from) in the form
+# of an *allocation descriptor* that can be passed to the memory allocator
+# (defined in a later layer).
+#
+# Currently an allocation descriptor consists of just the bounds of the pool of
+# available memory:
+#
+#   curr : address
+#   end : address
+#
+# This isn't enough information to reclaim individual allocations. We can't
+# support arbitrary reclamation yet.
 
 == code
 #   instruction                     effective address                                                   register    displacement    immediate