code: mafs

Download patch

ref: ce708f49bf5ec6c6b3fe1bb29d401c42b841b649
parent: 2679eaa65aba8006e4a647b556422e075d49a60b
author: 9ferno <gophone2015@gmail.com>
date: Fri Jan 13 08:52:52 EST 2023

updated document

--- a/docs/mafs.ms
+++ b/docs/mafs.ms
@@ -732,8 +732,12 @@
 Extents
 .ft R
 .sp
-Free blocks and memory are managed using Extents, an abstraction used to manage a continuous list of items.
+This is a more elaborate version of the storage allocator described in Section 8.7 of the K & R C Programming language book. It differs from the allocator described there by being a "Best first fit" instead of a "first fit". Also, instead of a circular linked list of free blocks, we maintain the free blocks in two doubly linked lists, one by start address and another by size and start address. We also maintain a list of recently used blocks to reduce the travel by linear scans.
 .sp
+Extents is an abstraction used to manage contiguous units. It is responsibility of the caller to manage the size and scaling of each unit.
+.sp
+Free blocks, memory and long names strings are managed using Extents.
+.sp
 An Extent represents a continuous list of items. An Extents is a list of such Extent's.
 .sp
 .nf
@@ -1644,3 +1648,5 @@
 [1] Sean Quinlan, "A Cached WORM File System," Software--Practice and Experience, Vol 21., No 12., December 1991, pp. 1289-1299
 .br
 [2] Ken Thompson, Geoff Collyer, "The 64-bit Standalone Plan 9 File Server"
+.br
+[2] Brian Kernighan, Dennis Ritchie, "The C Programming Language"