diff options
| author | Richard Kistruck | 2010-03-22 13:39:36 +0000 |
|---|---|---|
| committer | Richard Kistruck | 2010-03-22 13:39:36 +0000 |
| commit | 39da284821ea130e79ab6d493a26ac94b7ddddbf (patch) | |
| tree | a04d4eb8c12f938204ad3226d87c89e70740e01c /mps/code | |
| parent | b75de3e923de3c7a8dbc7a5832368fb93b9306e5 (diff) | |
| download | emacs-39da284821ea130e79ab6d493a26ac94b7ddddbf.tar.gz emacs-39da284821ea130e79ab6d493a26ac94b7ddddbf.zip | |
mps br/vmem: simple-chunk-return:
tract.c -- fix more ChunkCache defects:
- drop never-read chunkCache->pageTableBase and pageTableLimit fields: they were used for ChunkOfSeg(), back when each SegStruct was actually a PageStruct is some chunk's PageStructTable; see VMArenaChunkOfSeg() in //info.ravenbrook.com/project/mps/branch/2001-08-13/trunk/src/arenavm.chttps://github.com/Ravenbrook/mps/issues/46
- there's no need for arena to initialise the chunk cache; this allows en/decache functions to be local to tract.c (ie. declared static)
Copied from Perforce
Change: 170083
ServerID: perforce.ravenbrook.com
Diffstat (limited to 'mps/code')
| -rw-r--r-- | mps/code/arena.c | 3 | ||||
| -rw-r--r-- | mps/code/mpmst.h | 2 | ||||
| -rw-r--r-- | mps/code/tract.c | 4 | ||||
| -rw-r--r-- | mps/code/tract.h | 1 |
4 files changed, 1 insertions, 9 deletions
diff --git a/mps/code/arena.c b/mps/code/arena.c index 24d1214b97d..21c1759d74a 100644 --- a/mps/code/arena.c +++ b/mps/code/arena.c | |||
| @@ -223,9 +223,6 @@ Res ArenaCreateV(Arena *arenaReturn, ArenaClass class, va_list args) | |||
| 223 | goto failStripeSize; | 223 | goto failStripeSize; |
| 224 | } | 224 | } |
| 225 | 225 | ||
| 226 | /* load cache */ | ||
| 227 | ChunkEncache(arena, arena->primary); | ||
| 228 | |||
| 229 | res = ControlInit(arena); | 226 | res = ControlInit(arena); |
| 230 | if (res != ResOK) | 227 | if (res != ResOK) |
| 231 | goto failControlInit; | 228 | goto failControlInit; |
diff --git a/mps/code/mpmst.h b/mps/code/mpmst.h index 3163d90d0e9..23409087808 100644 --- a/mps/code/mpmst.h +++ b/mps/code/mpmst.h | |||
| @@ -546,8 +546,6 @@ typedef struct ChunkCacheEntryStruct { | |||
| 546 | Chunk chunk; | 546 | Chunk chunk; |
| 547 | Addr base; | 547 | Addr base; |
| 548 | Addr limit; | 548 | Addr limit; |
| 549 | Page pageTableBase; | ||
| 550 | Page pageTableLimit; | ||
| 551 | } ChunkCacheEntryStruct; | 549 | } ChunkCacheEntryStruct; |
| 552 | 550 | ||
| 553 | 551 | ||
diff --git a/mps/code/tract.c b/mps/code/tract.c index 2e254779e9d..c1e9838791f 100644 --- a/mps/code/tract.c +++ b/mps/code/tract.c | |||
| @@ -296,7 +296,7 @@ void ChunkCacheEntryInit(ChunkCacheEntry entry) | |||
| 296 | 296 | ||
| 297 | /* ChunkEncache -- cache a chunk */ | 297 | /* ChunkEncache -- cache a chunk */ |
| 298 | 298 | ||
| 299 | void ChunkEncache(Arena arena, Chunk chunk) | 299 | static void ChunkEncache(Arena arena, Chunk chunk) |
| 300 | { | 300 | { |
| 301 | /* Critical path; called by ChunkOfAddr */ | 301 | /* Critical path; called by ChunkOfAddr */ |
| 302 | AVERT_CRITICAL(Arena, arena); | 302 | AVERT_CRITICAL(Arena, arena); |
| @@ -312,8 +312,6 @@ void ChunkEncache(Arena arena, Chunk chunk) | |||
| 312 | arena->chunkCache.chunk = chunk; | 312 | arena->chunkCache.chunk = chunk; |
| 313 | arena->chunkCache.base = chunk->base; | 313 | arena->chunkCache.base = chunk->base; |
| 314 | arena->chunkCache.limit = chunk->limit; | 314 | arena->chunkCache.limit = chunk->limit; |
| 315 | arena->chunkCache.pageTableBase = &chunk->pageTable[0]; | ||
| 316 | arena->chunkCache.pageTableLimit = &chunk->pageTable[chunk->pages]; | ||
| 317 | 315 | ||
| 318 | AVERT_CRITICAL(ChunkCacheEntry, &arena->chunkCache); | 316 | AVERT_CRITICAL(ChunkCacheEntry, &arena->chunkCache); |
| 319 | return; | 317 | return; |
diff --git a/mps/code/tract.h b/mps/code/tract.h index c6ac2ae3bc8..794591f9f1b 100644 --- a/mps/code/tract.h +++ b/mps/code/tract.h | |||
| @@ -164,7 +164,6 @@ extern void ChunkFinish(Chunk chunk); | |||
| 164 | 164 | ||
| 165 | extern Bool ChunkCacheEntryCheck(ChunkCacheEntry entry); | 165 | extern Bool ChunkCacheEntryCheck(ChunkCacheEntry entry); |
| 166 | extern void ChunkCacheEntryInit(ChunkCacheEntry entry); | 166 | extern void ChunkCacheEntryInit(ChunkCacheEntry entry); |
| 167 | extern void ChunkEncache(Arena arena, Chunk chunk); | ||
| 168 | 167 | ||
| 169 | extern Bool ChunkOfAddr(Chunk *chunkReturn, Arena arena, Addr addr); | 168 | extern Bool ChunkOfAddr(Chunk *chunkReturn, Arena arena, Addr addr); |
| 170 | 169 | ||