MPS issue job003869

TitleReservoir refuses to supply memory
Assigned userGareth Rees
DescriptionIf you follow these steps:

1. Create an AMC pool with default arguments and an AP.
2. Create a low-memory reservoir with plenty of space.
3. Set the arena commit limit.
4. Allocate from the AP until allocation fails.
5. Allocate from the AP with the reservoir permit.

Then the allocation at step 5 fails, even though the reservoir has plenty of memory. This causes MMQA test function/132.c to fail.
AnalysisThis is because the low-memory reservoir can only withdraw a grain at a time. In ReservoirWithdraw [1]:

    /* @@@@ As a short-term measure, we only permit the reservoir to */
    /* allocate single-page regions. */
    /* See .improve.contiguous & change.dylan.jackdaw.160125 */
    if (size != ArenaGrainSize(arena))
      return ResMEMORY;

This affects any pool whose EXTEND_BY is greater than the arena grain size. Since change 186832 [2] the default EXTEND_BY for the AMC pool class is 8192, but the default arena grain size is 4096, so this fails.

Test function/132.c passes if it creates the AMC pool with EXTEND_BY set to 4096, but this isn't a solution: it just hides the problem.
How foundautomated_test
Test procedurefunction/132.c
Created byGareth Rees
Created on2014-10-07 23:50:46
Last modified byRichard Brooksby
Last modified on2016-03-15 05:23:43
History2014-10-07 GDR Created.


Change Effect Date User Description
190000 closed 2016-03-13 20:34:01 Richard Brooksby Basic removal of the reservoir pool from code and design.

Imported from Git
 Author: Richard Brooksby <> 1457901144 +0000
 Committer: Richard Brooksby <> 1457901144 +0000
 sha1: d1df7980778935fc4bb2244e904338987213f2f6
 push-state: complete
 parent-changes: 6b855f4239e9abf7c07ed092ce533f57044be1a9=[189990]