From 9edb44cd70e32b31755e98d4458e372c0fa40855 Mon Sep 17 00:00:00 2001 From: Gareth Rees Date: Fri, 13 Jun 2014 16:36:40 +0100 Subject: [PATCH] Remove references to arenaalign from the design. Copied from Perforce Change: 186581 ServerID: perforce.ravenbrook.com --- mps/design/poolamc.txt | 10 +++++----- mps/design/poolawl.txt | 7 ++++--- mps/design/poolmrg.txt | 4 ++-- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/mps/design/poolamc.txt b/mps/design/poolamc.txt index 52bfccf3d28..78dc7229e00 100644 --- a/mps/design/poolamc.txt +++ b/mps/design/poolamc.txt @@ -128,8 +128,8 @@ Placement pads are the BEF and LSP pads created in "to-space" when placing objects into segments. This wasted space is an expected space-cost of AMC's naive (but time-efficient) approach to placement of objects into segments. This is normally not a severe problem. (The -worst case is a client that always requests ``ArenaAlign() + 1`` byte -objects: this has a nearly 100% overhead). +worst case is a client that always requests objects that are one byte +larger than the arena grain size: this has a nearly 100% overhead). Retained pads could be a problem @@ -159,7 +159,7 @@ Small, medium, and large segments AMC categorises segments as **small** (one page), **medium** (several pages), or **large** (``AMCLargeSegPAGES`` or more):: - pages = SegSize(seg) / ArenaAlign(arena); + pages = SegSize(seg) / ArenaGrainSize(arena); if(pages == 1) { /* small */ } else if(pages < AMCLargeSegPAGES) { @@ -206,8 +206,8 @@ and ignore all others; this would be extremely simple to implement. But AMC cannot guarantee this, because in the MPS Allocation Point Protocol the client is permitted to make a large buffer reserve and then fill it with many small objects. In such a case, AMC must honour -all nails (if the buffer reserve request was an exact multiple of -``ArenaAlign()``), or all nails except to the last object (if there +all nails (if the buffer reserve request was an exact multiple of the +arena grain size), or all nails except to the last object (if there was a remainder filled with an LSP pad). Because an LSP pad cannot be distinguished from a client object, and the requested allocation size is not recorded, AMC cannot distinguish these two conditions at diff --git a/mps/design/poolawl.txt b/mps/design/poolawl.txt index fe7f0c999d4..bbbd7469d9b 100644 --- a/mps/design/poolawl.txt +++ b/mps/design/poolawl.txt @@ -463,10 +463,11 @@ Internal _`.fun.awlsegcreate`: Creates a segment of class ``AWLSegClass`` of size at least ``size``. -_`.fun.awlsegcreate.size.round`: ``size`` is rounded up to an -``ArenaAlign`` before requesting the segment. +_`.fun.awlsegcreate.size.round`: ``size`` is rounded up to the arena +grain size before requesting the segment. + _`.fun.awlsegcreate.size.round.justify`: The arena requires that all -segment sizes are aligned to the ``ArenaAlign``. +segment sizes are rounded up to the arena grain size. _`.fun.awlsegcreate.where`: The segment is allocated using a generation preference, using the generation number stored in the diff --git a/mps/design/poolmrg.txt b/mps/design/poolmrg.txt index cb31274915f..ad363ed15c1 100644 --- a/mps/design/poolmrg.txt +++ b/mps/design/poolmrg.txt @@ -410,8 +410,8 @@ used to be in the object is not accidentally fixed. _`.init`: Initializes the entry list, the free ring, the ref ring, and the ``extendBy`` field. -_`.init.extend`: The ``extendBy`` field is initialized to one -``ArenaAlign()`` (usually a page). +_`.init.extend`: The ``extendBy`` field is initialized to the arena +grain size. _`.init.extend.justify`: This is adequate as the pool is not expected to grow very quickly.