From 1168526896562065dc64219c42be9bc0e58fed0c Mon Sep 17 00:00:00 2001 From: Simon Brooke Date: Mon, 2 Jan 2017 18:37:34 +0000 Subject: [PATCH] Created free list (markdown) --- free-list.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 free-list.md diff --git a/free-list.md b/free-list.md new file mode 100644 index 0000000..130260b --- /dev/null +++ b/free-list.md @@ -0,0 +1,5 @@ +A free list is a list of FREE cells consed together. When a cell is deallocated, it is consed onto the front of the free list, and the system free-list pointer is updated to point to it. A cell is allocated by popping the front cell off the free list. + +If we attempt to allocate a new cell and the free list is empty, we allocate a new code page, cons all its cells onto the free list, and then pop the front cell off it. + +*However*, because we wish to localise volatility in memory in order to make maintaining a consistent backup image easier, it may be worth maintaining a separate free list for each page, and allocating cells not from the front of the active free list but from the free list of the currently most active page. \ No newline at end of file