18. Pool and pool class mechanisms¶
18.1. Definitions¶
.def.outer-structure: The “outer structure” (of a pool) is a C
object of type PoolXXXStruct
or the type struct PoolXXXStruct
itself.
.def.generic-structure: The “generic structure” is a C object of
type PoolStruct
(found embedded in the outer-structure) or the
type struct PoolStruct
itself.
18.2. Defaults¶
.align: When initialised, the pool gets the default alignment
(ARCH_ALIGN
).
.no: If a pool class doesn’t implement a method, and doesn’t expect
it to be called, it should use a non-method (PoolNo*
) which will
cause an assertion failure if they are reached.
.triv: If a pool class supports a protocol but does not require any
more than a trivial implementation, it should use a trivial method
(PoolTriv*
) which will do the trivial thing.
.outer-structure.sig: It is good practice to put the signature for the outer structure at the end (of the structure). This is because there’s already one at the beginning (in the poolStruct) so putting it at the end gives some extra fencepost checking.
18.3. Requirements¶
Note
Placeholder: must derive the requirements from the architecture.
.req.fix: PoolFix()
must be fast.
18.4. Other¶
Interface in mpm.h Types in mpmst.h See also design.mps.poolclass