Title | VM arena uses two VMs when one might do |
Status | open |
Priority | nice |
Assigned user | Gareth Rees |
Organization | Ravenbrook |
Description | The 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. |
Analysis | Use 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 <tract.c#chunk.at.base> 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 found | inspection |
Evidence | [1] <https://info.ravenbrook.com/mail/2015/08/11/15-52-34/0/ > |
Created by | Gareth Rees |
Created on | 2015-08-14 10:43:42 |
Last modified by | Gareth Rees |
Last modified on | 2016-10-17 14:23:08 |
History | 2015-08-14 GDR Created. |