Changeset 554 for abuse/trunk/src/lisp/lisp_gc.cpp
- Timestamp:
- Apr 29, 2011, 1:39:32 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
abuse/trunk/src/lisp/lisp_gc.cpp
r553 r554 233 233 } 234 234 235 void collect_space(int which_space ) // should be tmp or permanent235 void collect_space(int which_space, int grow) // should be tmp or permanent 236 236 { 237 237 int old_space = current_space; … … 240 240 241 241 space_size[GC_SPACE] = space_size[which_space]; 242 if (grow) 243 { 244 space_size[GC_SPACE] += space_size[which_space] >> 1; 245 space_size[GC_SPACE] -= (space_size[GC_SPACE] & 7); 246 } 242 247 uint8_t *new_space = (uint8_t *)malloc(space_size[GC_SPACE]); 243 248 current_space = GC_SPACE; … … 255 260 256 261 space[which_space] = new_space; 262 space_size[which_space] = space_size[GC_SPACE]; 257 263 free_space[which_space] = new_space 258 264 + (free_space[GC_SPACE] - space[GC_SPACE]);
Note: See TracChangeset
for help on using the changeset viewer.