Changeset 553 for abuse/trunk/src/lisp
- Timestamp:
- Apr 29, 2011, 1:39:28 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
abuse/trunk/src/lisp/lisp_gc.cpp
r524 r553 42 42 static uint8_t *cstart, *cend, *collected_start, *collected_end; 43 43 44 static void dump_memory(void *mem, int before, int after)45 {46 uint8_t *p = (uint8_t *)mem;47 48 fprintf(stderr, "dumping memory around %p:\n", p);49 for (int i = -before; i < after; i++)50 {51 if (!(i & 15))52 fprintf(stderr, "%p: ", p + i);53 fprintf(stderr, "%c%02x%c", i ? ' ' : '[', p[i], i ? ' ' : ']');54 if (!((i + 1) & 15))55 fprintf(stderr, "\n");56 }57 }58 59 44 void register_pointer(void **addr) 60 45 { … … 131 116 if (((uint8_t *)x) >= cstart && ((uint8_t *)x) < cend) 132 117 { 133 //dump_memory(x, 32, 48);134 118 switch (item_type(x)) 135 119 { … … 193 177 break; 194 178 default: 195 dump_memory(x, 8, 196); 196 //*(char *)NULL = 0; 197 lbreak("shouldn't happen. collecting bad object 0x%x\n", 198 item_type(x)); 179 lbreak("shouldn't happen. collecting bad object 0x%x\n", item_type(x)); 199 180 break; 200 181 } … … 266 247 collected_end = new_space + space_size[GC_SPACE]; 267 248 268 //dump_memory((char *)lsym_root->name, 128, 196);269 //dump_memory((char *)0xb6782025, 32, 48);270 249 collect_symbols(LSymbol::root); 271 250 collect_stacks();
Note: See TracChangeset
for help on using the changeset viewer.