Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] Diff of /sml/trunk/runtime/gc/big-objects.c
ViewVC logotype

Diff of /sml/trunk/runtime/gc/big-objects.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 4312, Thu Sep 15 17:49:25 2016 UTC revision 4313, Thu Sep 15 22:10:07 2016 UTC
# Line 19  Line 19 
19      bigobj_desc_t       *dp, *dq;      bigobj_desc_t       *dp, *dq;
20      int                 i;      int                 i;
21    
22      SayDebug ("[%d] %d/%d, @%#x: ", r->minGen, r->nFree, r->nPages, r->firstPage);      SayDebug ("[%d] %d/%d, @%p: ", r->minGen, r->nFree, r->nPages, (void *)(r->firstPage));
23      for (i = 0, dq = NIL(bigobj_desc_t *);  i < r->nPages;  i++) {      for (i = 0, dq = NIL(bigobj_desc_t *);  i < r->nPages;  i++) {
24          dp = r->objMap[i];          dp = r->objMap[i];
25          if (dp != dq) {          if (dp != dq) {
# Line 93  Line 93 
93      desc->region        = region;      desc->region        = region;
94    
95  #ifdef BO_DEBUG  #ifdef BO_DEBUG
96  SayDebug ("BO_AllocRegion: %d pages @ %#x\n", npages, region->firstPage);  SayDebug ("BO_AllocRegion: %d pages @ %p\n", npages, (void *)(region->firstPage));
97  #endif  #endif
98      return desc;      return desc;
99    
# Line 167  Line 167 
167          region->minGen = gen;          region->minGen = gen;
168          MarkRegion (BIBOP, (ml_val_t *)region, MEMOBJ_SZB(region->memObj),          MarkRegion (BIBOP, (ml_val_t *)region, MEMOBJ_SZB(region->memObj),
169              AID_BIGOBJ(gen));              AID_BIGOBJ(gen));
170          BIBOP[BIBOP_ADDR_TO_INDEX(region)] = AID_BIGOBJ_HDR(gen);          ADDR_TO_PAGEID(BIBOP, region) = AID_BIGOBJ_HDR(gen);
171      }      }
172    
173  #ifdef BO_DEBUG  #ifdef BO_DEBUG
174  SayDebug ("BO_Alloc: %d bytes @ %#x\n", objSzB, newObj->obj);  SayDebug ("BO_Alloc: %d bytes @ %p\n", objSzB, (void *)(newObj->obj));
175  PrintRegionMap(region);  PrintRegionMap(region);
176  #endif  #endif
177      return newObj;      return newObj;
# Line 195  Line 195 
195    
196  #ifdef BO_DEBUG  #ifdef BO_DEBUG
197  SayDebug ("BO_Free: @ %#x, bibop gen = %x, gen = %d, state = %d, pages=[%d..%d)\n",  SayDebug ("BO_Free: @ %#x, bibop gen = %x, gen = %d, state = %d, pages=[%d..%d)\n",
198  desc->obj, (unsigned)EXTRACT_GEN(ADDR_TO_PAGEID(BIBOP, desc->obj)), desc->gen, desc->state, firstPage, lastPage);  desc->obj, (unsigned)EXTRACT_GEN(ADDR_TO_PAGEID(BIBOP, desc->obj)), desc->gen, desc->state,
199    firstPage, lastPage);
200  PrintRegionMap(region);  PrintRegionMap(region);
201  #endif  #endif
202      if ((firstPage > 0) && BO_IS_FREE(region->objMap[firstPage-1])) {      if ((firstPage > 0) && BO_IS_FREE(region->objMap[firstPage-1])) {
# Line 266  Line 267 
267    
268      if (IS_BIGOBJ_AID(aid)) {      if (IS_BIGOBJ_AID(aid)) {
269          int             indx = BIBOP_ADDR_TO_INDEX(pc);          int             indx = BIBOP_ADDR_TO_INDEX(pc);
270          while (!BO_IS_HDR(aid))          while (!BO_IS_HDR(aid)) {
271              aid = BIBOP[--indx];              --indx;
272                aid = INDEX_TO_PAGEID(BIBOP,indx);
273            }
274          region = (bigobj_region_t *)BIBOP_INDEX_TO_ADDR(indx);          region = (bigobj_region_t *)BIBOP_INDEX_TO_ADDR(indx);
275          return BO_GetCodeObjTag (ADDR_TO_BODESC(region, pc));          return BO_GetCodeObjTag (ADDR_TO_BODESC(region, pc));
276      }      }

Legend:
Removed from v.4312  
changed lines
  Added in v.4313

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0