From 6b580943b213763d29037217993ffaf35f495c7d Mon Sep 17 00:00:00 2001 From: Gareth Rees Date: Tue, 19 Apr 2016 19:24:46 +0100 Subject: [PATCH] Make it clear where tags are defined and where they are referenced, as suggested by rb in review. Copied from Perforce Change: 191288 ServerID: perforce.ravenbrook.com --- mps/code/arenavm.c | 14 +++++++------- mps/code/tract.c | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/mps/code/arenavm.c b/mps/code/arenavm.c index fba777e1f2d..6b057dafd04 100644 --- a/mps/code/arenavm.c +++ b/mps/code/arenavm.c @@ -360,13 +360,13 @@ static Res VMChunkInit(Chunk chunk, BootBlock boot) vmChunk = Chunk2VMChunk(chunk); AVERT(BootBlock, boot); - /* .overhead.sa-mapped */ + /* .overhead.sa-mapped: Chunk overhead for sparse array 'mapped' table. */ res = BootAlloc(&p, boot, BTSize(chunk->pages), MPS_PF_ALIGN); if (res != ResOK) goto failSaMapped; saMapped = p; - /* .overhead.sa-pages */ + /* .overhead.sa-pages: Chunk overhead for sparse array 'pages' table. */ res = BootAlloc(&p, boot, BTSize(chunk->pageTablePages), MPS_PF_ALIGN); if (res != ResOK) goto failSaPages; @@ -522,22 +522,22 @@ static Res vmArenaChunkSize(Size *chunkSizeReturn, VMArena vmArena, Size size) do { chunkSize = size + overhead; - /* .overhead.chunk-struct */ + /* See .overhead.chunk-struct. */ overhead = SizeAlignUp(sizeof(VMChunkStruct), MPS_PF_ALIGN); - /* .overhead.pages */ + /* See , */ pages = chunkSize >> grainShift; overhead += SizeAlignUp(BTSize(pages), MPS_PF_ALIGN); - /* .overhead.sa-mapped */ + /* See .overhead.sa-mapped. */ overhead += SizeAlignUp(BTSize(pages), MPS_PF_ALIGN); - /* .overhead.sa-pages */ + /* See .overhead.sa-pages. */ pageTableSize = SizeAlignUp(pages * sizeof(PageUnion), grainSize); pageTablePages = pageTableSize >> grainShift; overhead += SizeAlignUp(BTSize(pageTablePages), MPS_PF_ALIGN); - /* .overhead.page-table */ + /* See .overhead.page-table. */ overhead = SizeAlignUp(overhead, grainSize); overhead += SizeAlignUp(pageTableSize, grainSize); diff --git a/mps/code/tract.c b/mps/code/tract.c index d7e00ce7d03..6883afb9337 100644 --- a/mps/code/tract.c +++ b/mps/code/tract.c @@ -197,7 +197,7 @@ Res ChunkInit(Chunk chunk, Arena arena, Addr base, Addr limit, Size reserved, chunk->reserved = reserved; size = ChunkSize(chunk); - /* .overhead.pages */ + /* .overhead.pages: Chunk overhead for the page allocation table. */ chunk->pages = pages = size >> pageShift; res = BootAlloc(&p, boot, (size_t)BTSize(pages), MPS_PF_ALIGN); if (res != ResOK)