MPS issue job003928

TitleVM arena uses two VMs when one might do
Assigned userGareth Rees
DescriptionThe VM arena bootstrap creates two VMs: the first just a page long to store the arena data structure, the second being the primary chunk. But the client arena doesn't need to do this: it just sticks the arena data structure at the start of the primary chunk.
AnalysisUse just one VM. NB says [1], "maybe this would allow us to put the primary chunk into the arena's free land inside ArenaInit?" (Thus simplifying the bootstrap in arena.c.)

Note that there are several difficulties in making this change:

1. We rely on the ChunkStruct being at the base of its chunk: see <>
2. VMArenaCreate won't be able to call VMChunkCreate, it will need its own logic for the primary chunk.
3. VMArenaDestroy won't be able to call vmChunkDestroy on the primary chunk, it will need its own logic for the primary chunk.

I think the complexity of making this change suggests that it's a bad idea at present.
How foundinspection
Evidence[1] <>
Created byGareth Rees
Created on2015-08-14 10:43:42
Last modified byGareth Rees
Last modified on2016-10-17 14:23:08
History2015-08-14 GDR Created.