.. index:: pair: pool class mechanism; design .. _design-pool: Pool and pool class mechanisms ============================== .. mps:prefix:: design.mps.pool Definitions ----------- :mps:tag:`def.outer-structure` The "outer structure" (of a pool) is a C object of type :c:type:`PoolXXXStruct` or the type ``struct PoolXXXStruct`` itself. :mps:tag:`def.generic-structure` The "generic structure" is a C object of type :c:type:`PoolStruct` (found embedded in the outer-structure) or the type ``struct PoolStruct`` itself. Defaults -------- :mps:tag:`align` When initialised, the pool gets the default alignment (:c:macro:`ARCH_ALIGN`). :mps:tag:`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. :mps:tag:`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. :mps:tag:`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. Requirements ------------ .. note:: Placeholder: must derive the requirements from the architecture. :mps:tag:`req.fix` :c:func:`PoolFix()` must be fast. Other ----- Interface in mpm.h Types in mpmst.h See also design.mps.poolclass