comparison src/dumper.c @ 3263:d674024a8674

[xemacs-hg @ 2006-02-27 16:29:00 by crestani] - Introduce a fancy asynchronous finalization strategy on C level. - Merge the code conditioned on MC_ALLOC into the code conditioned on NEW_GC. - Remove the possibility to free objects manually outside garbage collections when the new collector is enabled.
author crestani
date Mon, 27 Feb 2006 16:29:29 +0000
parents 503174cac05a
children a4917b3c97cc
comparison
equal deleted inserted replaced
3262:79d41cfd8e6b 3263:d674024a8674
235 int count; 235 int count;
236 } pdump_reloc_table; 236 } pdump_reloc_table;
237 237
238 static Rawbyte *pdump_rt_list = 0; 238 static Rawbyte *pdump_rt_list = 0;
239 239
240 #ifndef MC_ALLOC 240 #ifndef NEW_GC
241 void 241 void
242 pdump_objects_unmark (void) 242 pdump_objects_unmark (void)
243 { 243 {
244 int i; 244 int i;
245 Rawbyte *p = pdump_rt_list; 245 Rawbyte *p = pdump_rt_list;
259 } 259 }
260 } else 260 } else
261 break; 261 break;
262 } 262 }
263 } 263 }
264 #endif /* not MC_ALLOC */ 264 #endif /* not NEW_GC */
265 265
266 266
267 #ifdef MC_ALLOC 267 #ifdef NEW_GC
268 /* The structure of the dump file looks like this: 268 /* The structure of the dump file looks like this:
269 0 - header 269 0 - header
270 - dumped objects 270 - dumped objects
271 stab_offset - mc allocation table (count, size, address) for individual 271 stab_offset - mc allocation table (count, size, address) for individual
272 allocation and relocation at load time. 272 allocation and relocation at load time.
279 - nb_root_blocks*struct(void *, size, info) for global 279 - nb_root_blocks*struct(void *, size, info) for global
280 objects to restore 280 objects to restore
281 - root lisp object address/value couples with the count 281 - root lisp object address/value couples with the count
282 preceding the list 282 preceding the list
283 */ 283 */
284 #else /* not MC_ALLOC */ 284 #else /* not NEW_GC */
285 /* The structure of the dump file looks like this: 285 /* The structure of the dump file looks like this:
286 0 - header 286 0 - header
287 - dumped objects 287 - dumped objects
288 stab_offset - nb_cv_data*struct(dest, adr) for in-object externally 288 stab_offset - nb_cv_data*struct(dest, adr) for in-object externally
289 represented data 289 represented data
294 data-segment blocks to restore 294 data-segment blocks to restore
295 - relocation table 295 - relocation table
296 - root lisp object address/value couples with the count 296 - root lisp object address/value couples with the count
297 preceding the list 297 preceding the list
298 */ 298 */
299 #endif /* not MC_ALLOC */ 299 #endif /* not NEW_GC */
300 300
301 301
302 #define PDUMP_SIGNATURE "XEmacsDP" 302 #define PDUMP_SIGNATURE "XEmacsDP"
303 #define PDUMP_SIGNATURE_LEN (sizeof (PDUMP_SIGNATURE) - 1) 303 #define PDUMP_SIGNATURE_LEN (sizeof (PDUMP_SIGNATURE) - 1)
304 304
432 static Bytecount max_size; 432 static Bytecount max_size;
433 static int pdump_fd; 433 static int pdump_fd;
434 static void *pdump_buf; 434 static void *pdump_buf;
435 static FILE *pdump_out; 435 static FILE *pdump_out;
436 436
437 #ifdef MC_ALLOC 437 #ifdef NEW_GC
438 /* PDUMP_HASHSIZE is a large prime. */ 438 /* PDUMP_HASHSIZE is a large prime. */
439 #define PDUMP_HASHSIZE 1000003 439 #define PDUMP_HASHSIZE 1000003
440 /* Nothing special about PDUMP_HASH_MULTIPLIER: arbitrary odd integer 440 /* Nothing special about PDUMP_HASH_MULTIPLIER: arbitrary odd integer
441 smaller than PDUMP_HASHSIZE. */ 441 smaller than PDUMP_HASHSIZE. */
442 #define PDUMP_HASH_MULTIPLIER 12347 442 #define PDUMP_HASH_MULTIPLIER 12347
443 /* Nothing special about PDUMP_HASH_STEP: arbitrary integer for linear 443 /* Nothing special about PDUMP_HASH_STEP: arbitrary integer for linear
444 probing. */ 444 probing. */
445 #define PDUMP_HASH_STEP 574853 445 #define PDUMP_HASH_STEP 574853
446 #else /* not MC_ALLOC */ 446 #else /* not NEW_GC */
447 #define PDUMP_HASHSIZE 200001 447 #define PDUMP_HASHSIZE 200001
448 #endif /* not MC_ALLOC */ 448 #endif /* not NEW_GC */
449 449
450 static pdump_block_list_elt **pdump_hash; 450 static pdump_block_list_elt **pdump_hash;
451 451
452 #ifndef MC_ALLOC 452 #ifndef NEW_GC
453 /* Since most pointers are eight bytes aligned, the >>3 allows for a better hash */ 453 /* Since most pointers are eight bytes aligned, the >>3 allows for a better hash */
454 #endif /* not MC_ALLOC */ 454 #endif /* not NEW_GC */
455 static int 455 static int
456 pdump_make_hash (const void *obj) 456 pdump_make_hash (const void *obj)
457 { 457 {
458 #ifdef MC_ALLOC 458 #ifdef NEW_GC
459 return ((unsigned long)(obj) * PDUMP_HASH_MULTIPLIER) % PDUMP_HASHSIZE; 459 return ((unsigned long)(obj) * PDUMP_HASH_MULTIPLIER) % PDUMP_HASHSIZE;
460 #else /* not MC_ALLOC */ 460 #else /* not NEW_GC */
461 return ((unsigned long)(obj)>>3) % PDUMP_HASHSIZE; 461 return ((unsigned long)(obj)>>3) % PDUMP_HASHSIZE;
462 #endif /* not MC_ALLOC */ 462 #endif /* not NEW_GC */
463 } 463 }
464 464
465 /* Return the entry for an already-registered memory block at OBJ, 465 /* Return the entry for an already-registered memory block at OBJ,
466 or NULL if none. */ 466 or NULL if none. */
467 467
522 if (align < list->align) 522 if (align < list->align)
523 list->align = align; 523 list->align = align;
524 } 524 }
525 } 525 }
526 526
527 #ifdef MC_ALLOC 527 #ifdef NEW_GC
528 typedef struct mc_addr_elt 528 typedef struct mc_addr_elt
529 { 529 {
530 const void *obj; 530 const void *obj;
531 EMACS_INT addr; 531 EMACS_INT addr;
532 } mc_addr_elt; 532 } mc_addr_elt;
585 } 585 }
586 586
587 pdump_mc_hash[pos].obj = obj; 587 pdump_mc_hash[pos].obj = obj;
588 pdump_mc_hash[pos].addr = addr; 588 pdump_mc_hash[pos].addr = addr;
589 } 589 }
590 #endif /* MC_ALLOC */ 590 #endif /* NEW_GC */
591 591
592 static pdump_block_list * 592 static pdump_block_list *
593 pdump_get_block_list (const struct memory_description *desc) 593 pdump_get_block_list (const struct memory_description *desc)
594 { 594 {
595 int i; 595 int i;
877 return; 877 return;
878 878
879 imp = LHEADER_IMPLEMENTATION (objh); 879 imp = LHEADER_IMPLEMENTATION (objh);
880 880
881 if (imp->description 881 if (imp->description
882 #ifdef NEW_GC
883 /* Objects with finalizers cannot be dumped with the new
884 allocator's asynchronous finalization strategy. */
885 && !imp->finalizer
886 #endif /* not NEW_GC */
882 && RECORD_DUMPABLE (objh)) 887 && RECORD_DUMPABLE (objh))
883 { 888 {
884 pdump_bump_depth (); 889 pdump_bump_depth ();
885 backtrace[pdump_depth - 1].obj = objh; 890 backtrace[pdump_depth - 1].obj = objh;
886 pdump_add_block (pdump_object_table + objh->type, 891 pdump_add_block (pdump_object_table + objh->type,
1198 pdump_store_new_pointer_offsets (count, pdump_buf, elt->obj, desc, size); 1203 pdump_store_new_pointer_offsets (count, pdump_buf, elt->obj, desc, size);
1199 } 1204 }
1200 retry_fwrite (desc ? pdump_buf : elt->obj, size, count, pdump_out); 1205 retry_fwrite (desc ? pdump_buf : elt->obj, size, count, pdump_out);
1201 } 1206 }
1202 1207
1203 #ifdef MC_ALLOC 1208 #ifdef NEW_GC
1204 /* To be able to relocate during load time, more information about the 1209 /* To be able to relocate during load time, more information about the
1205 dumped objects are needed: The count (for array-like data 1210 dumped objects are needed: The count (for array-like data
1206 structures), the size of the object, and the location in the dumped 1211 structures), the size of the object, and the location in the dumped
1207 data. 1212 data.
1208 */ 1213 */
1235 1240
1236 for (i=0; i<lrecord_type_count; i++) 1241 for (i=0; i<lrecord_type_count; i++)
1237 if (pdump_object_table[i].align == align) 1242 if (pdump_object_table[i].align == align)
1238 for (elt = pdump_object_table[i].first; elt; elt = elt->next) 1243 for (elt = pdump_object_table[i].first; elt; elt = elt->next)
1239 { 1244 {
1240 #ifndef NEW_GC
1241 assert (elt->count == 1);
1242 #endif /* not NEW_GC */
1243 f (elt, lrecord_implementations_table[i]->description); 1245 f (elt, lrecord_implementations_table[i]->description);
1244 } 1246 }
1245 } 1247 }
1246 } 1248 }
1247 1249
1298 case XD_HASHCODE: 1300 case XD_HASHCODE:
1299 case XD_INT: 1301 case XD_INT:
1300 case XD_LONG: 1302 case XD_LONG:
1301 case XD_INT_RESET: 1303 case XD_INT_RESET:
1302 break; 1304 break;
1303 #ifdef NEW_GC
1304 case XD_LISP_OBJECT_BLOCK_PTR: 1305 case XD_LISP_OBJECT_BLOCK_PTR:
1305 #endif /* NEW_GC */
1306 case XD_OPAQUE_DATA_PTR: 1306 case XD_OPAQUE_DATA_PTR:
1307 case XD_ASCII_STRING: 1307 case XD_ASCII_STRING:
1308 case XD_BLOCK_PTR: 1308 case XD_BLOCK_PTR:
1309 case XD_LO_LINK: 1309 case XD_LO_LINK:
1310 { 1310 {
1403 default: 1403 default:
1404 pdump_unsupported_dump_type (desc1->type, 0); 1404 pdump_unsupported_dump_type (desc1->type, 0);
1405 } 1405 }
1406 } 1406 }
1407 } 1407 }
1408 #else /* not MC_ALLOC */ 1408 #else /* not NEW_GC */
1409 /* Relocate a single memory block at DATA, described by DESC, from its 1409 /* Relocate a single memory block at DATA, described by DESC, from its
1410 assumed load location to its actual one by adding DELTA to all pointers 1410 assumed load location to its actual one by adding DELTA to all pointers
1411 in the block. Does not recursively relocate any other memory blocks 1411 in the block. Does not recursively relocate any other memory blocks
1412 pointed to. (We already have a list of all memory blocks in the dump 1412 pointed to. (We already have a list of all memory blocks in the dump
1413 file.) This is used once the dump data has been loaded back in, both 1413 file.) This is used once the dump data has been loaded back in, both
1537 default: 1537 default:
1538 pdump_unsupported_dump_type (desc1->type, 0); 1538 pdump_unsupported_dump_type (desc1->type, 0);
1539 } 1539 }
1540 } 1540 }
1541 } 1541 }
1542 #endif /* not MC_ALLOC */ 1542 #endif /* not NEW_GC */
1543 1543
1544 static void 1544 static void
1545 pdump_allocate_offset (pdump_block_list_elt *elt, 1545 pdump_allocate_offset (pdump_block_list_elt *elt,
1546 const struct memory_description *UNUSED (desc)) 1546 const struct memory_description *UNUSED (desc))
1547 { 1547 {
2158 elt->fcts->convert_free(elt->object, elt->data, elt->size); 2158 elt->fcts->convert_free(elt->object, elt->data, elt->size);
2159 } 2159 }
2160 2160
2161 fseek (pdump_out, header.stab_offset, SEEK_SET); 2161 fseek (pdump_out, header.stab_offset, SEEK_SET);
2162 2162
2163 #ifdef MC_ALLOC 2163 #ifdef NEW_GC
2164 { 2164 {
2165 EMACS_INT zero = 0; 2165 EMACS_INT zero = 0;
2166 pdump_scan_lisp_objects_by_alignment (pdump_dump_mc_data); 2166 pdump_scan_lisp_objects_by_alignment (pdump_dump_mc_data);
2167 PDUMP_WRITE_ALIGNED (EMACS_INT, zero); 2167 PDUMP_WRITE_ALIGNED (EMACS_INT, zero);
2168 pdump_scan_non_lisp_objects_by_alignment (pdump_dump_mc_data); 2168 pdump_scan_non_lisp_objects_by_alignment (pdump_dump_mc_data);
2169 PDUMP_WRITE_ALIGNED (EMACS_INT, zero); 2169 PDUMP_WRITE_ALIGNED (EMACS_INT, zero);
2170 } 2170 }
2171 #endif /* MC_ALLOC */ 2171 #endif /* NEW_GC */
2172 pdump_dump_cv_data_info (); 2172 pdump_dump_cv_data_info ();
2173 pdump_dump_cv_ptr_info (); 2173 pdump_dump_cv_ptr_info ();
2174 #ifdef MC_ALLOC 2174 #ifdef NEW_GC
2175 pdump_dump_rtables (); 2175 pdump_dump_rtables ();
2176 #endif /* MC_ALLOC */ 2176 #endif /* NEW_GC */
2177 pdump_dump_root_block_ptrs (); 2177 pdump_dump_root_block_ptrs ();
2178 pdump_dump_root_blocks (); 2178 pdump_dump_root_blocks ();
2179 #ifndef MC_ALLOC 2179 #ifndef NEW_GC
2180 pdump_dump_rtables (); 2180 pdump_dump_rtables ();
2181 #endif /* not MC_ALLOC */ 2181 #endif /* not NEW_GC */
2182 pdump_dump_root_lisp_objects (); 2182 pdump_dump_root_lisp_objects ();
2183 2183
2184 retry_fclose (pdump_out); 2184 retry_fclose (pdump_out);
2185 retry_close (pdump_fd); 2185 retry_close (pdump_fd);
2186 2186
2225 pdump_end = pdump_start + pdump_length; 2225 pdump_end = pdump_start + pdump_length;
2226 2226
2227 delta = ((EMACS_INT) pdump_start) - header->reloc_address; 2227 delta = ((EMACS_INT) pdump_start) - header->reloc_address;
2228 p = pdump_start + header->stab_offset; 2228 p = pdump_start + header->stab_offset;
2229 2229
2230 #ifdef MC_ALLOC 2230 #ifdef NEW_GC
2231 pdump_mc_hash = xnew_array_and_zero (mc_addr_elt, PDUMP_HASHSIZE); 2231 pdump_mc_hash = xnew_array_and_zero (mc_addr_elt, PDUMP_HASHSIZE);
2232 2232
2233 /* Allocate space for each object individually. First the 2233 /* Allocate space for each object individually. First the
2234 Lisp_Objects, then the blocks. */ 2234 Lisp_Objects, then the blocks. */
2235 count = 2; 2235 count = 2;
2249 Bytecount real_size = size * elt_count; 2249 Bytecount real_size = size * elt_count;
2250 if (count == 2) 2250 if (count == 2)
2251 { 2251 {
2252 if (elt_count <= 1) 2252 if (elt_count <= 1)
2253 mc_addr = (Rawbyte *) mc_alloc (real_size); 2253 mc_addr = (Rawbyte *) mc_alloc (real_size);
2254 #ifdef NEW_GC
2255 else 2254 else
2256 mc_addr = (Rawbyte *) mc_alloc_array (size, elt_count); 2255 mc_addr = (Rawbyte *) mc_alloc_array (size, elt_count);
2257 #endif /* NEW_GC */
2258 #ifdef ALLOC_TYPE_STATS 2256 #ifdef ALLOC_TYPE_STATS
2259 inc_lrecord_stats (real_size, 2257 inc_lrecord_stats (real_size,
2260 (const struct lrecord_header *) 2258 (const struct lrecord_header *)
2261 ((Rawbyte *) rdata + delta)); 2259 ((Rawbyte *) rdata + delta));
2262 #endif /* ALLOC_TYPE_STATS */ 2260 #endif /* ALLOC_TYPE_STATS */
2272 } 2270 }
2273 } 2271 }
2274 else if (!(--count)) 2272 else if (!(--count))
2275 break; 2273 break;
2276 } 2274 }
2277 #endif /* MC_ALLOC */ 2275 #endif /* NEW_GC */
2278 2276
2279 /* Get the cv_data array */ 2277 /* Get the cv_data array */
2280 p = (Rawbyte *) ALIGN_PTR (p, pdump_cv_data_dump_info); 2278 p = (Rawbyte *) ALIGN_PTR (p, pdump_cv_data_dump_info);
2281 pdump_loaded_cv_data = (pdump_cv_data_dump_info *)p; 2279 pdump_loaded_cv_data = (pdump_cv_data_dump_info *)p;
2282 p += header->nb_cv_data*sizeof(pdump_cv_data_dump_info); 2280 p += header->nb_cv_data*sizeof(pdump_cv_data_dump_info);
2291 pdump_loaded_cv_ptr[i].save_offset = info.save_offset; 2289 pdump_loaded_cv_ptr[i].save_offset = info.save_offset;
2292 pdump_loaded_cv_ptr[i].size = info.size; 2290 pdump_loaded_cv_ptr[i].size = info.size;
2293 pdump_loaded_cv_ptr[i].adr = 0; 2291 pdump_loaded_cv_ptr[i].adr = 0;
2294 } 2292 }
2295 2293
2296 #ifdef MC_ALLOC 2294 #ifdef NEW_GC
2297 /* Relocate the heap objects */ 2295 /* Relocate the heap objects */
2298 pdump_rt_list = p; 2296 pdump_rt_list = p;
2299 count = 2; 2297 count = 2;
2300 for (;;) 2298 for (;;)
2301 { 2299 {
2312 p += rt.count * sizeof (Rawbyte *); 2310 p += rt.count * sizeof (Rawbyte *);
2313 } 2311 }
2314 else if (!(--count)) 2312 else if (!(--count))
2315 break; 2313 break;
2316 } 2314 }
2317 #endif /* MC_ALLOC */ 2315 #endif /* NEW_GC */
2318 2316
2319 /* Put back the pdump_root_block_ptrs */ 2317 /* Put back the pdump_root_block_ptrs */
2320 p = (Rawbyte *) ALIGN_PTR (p, pdump_static_pointer); 2318 p = (Rawbyte *) ALIGN_PTR (p, pdump_static_pointer);
2321 for (i = 0; i < header->nb_root_block_ptrs; i++) 2319 for (i = 0; i < header->nb_root_block_ptrs; i++)
2322 { 2320 {
2323 pdump_static_pointer ptr = PDUMP_READ (p, pdump_static_pointer); 2321 pdump_static_pointer ptr = PDUMP_READ (p, pdump_static_pointer);
2324 #ifdef MC_ALLOC 2322 #ifdef NEW_GC
2325 (* ptr.address) = (Rawbyte *) pdump_get_mc_addr (ptr.value); 2323 (* ptr.address) = (Rawbyte *) pdump_get_mc_addr (ptr.value);
2326 #else /* not MC_ALLOC */ 2324 #else /* not NEW_GC */
2327 (* ptr.address) = ptr.value + delta; 2325 (* ptr.address) = ptr.value + delta;
2328 #endif /* not MC_ALLOC */ 2326 #endif /* not NEW_GC */
2329 } 2327 }
2330 2328
2331 /* Put back the pdump_root_blocks and relocate */ 2329 /* Put back the pdump_root_blocks and relocate */
2332 for (i = 0; i < header->nb_root_blocks; i++) 2330 for (i = 0; i < header->nb_root_blocks; i++)
2333 { 2331 {
2334 pdump_root_block info = PDUMP_READ_ALIGNED (p, pdump_root_block); 2332 pdump_root_block info = PDUMP_READ_ALIGNED (p, pdump_root_block);
2335 memcpy ((void *) info.blockaddr, p, info.size); 2333 memcpy ((void *) info.blockaddr, p, info.size);
2336 if (info.desc) 2334 if (info.desc)
2337 #ifdef MC_ALLOC 2335 #ifdef NEW_GC
2338 pdump_reloc_one_mc ((void *) info.blockaddr, info.desc); 2336 pdump_reloc_one_mc ((void *) info.blockaddr, info.desc);
2339 #else /* not MC_ALLOC */ 2337 #else /* not NEW_GC */
2340 pdump_reloc_one ((void *) info.blockaddr, delta, info.desc); 2338 pdump_reloc_one ((void *) info.blockaddr, delta, info.desc);
2341 #endif /* not MC_ALLOC */ 2339 #endif /* not NEW_GC */
2342 p += info.size; 2340 p += info.size;
2343 } 2341 }
2344 2342
2345 #ifndef MC_ALLOC 2343 #ifndef NEW_GC
2346 /* Relocate the heap objects */ 2344 /* Relocate the heap objects */
2347 pdump_rt_list = p; 2345 pdump_rt_list = p;
2348 count = 2; 2346 count = 2;
2349 for (;;) 2347 for (;;)
2350 { 2348 {
2361 p += rt.count * sizeof (Rawbyte *); 2359 p += rt.count * sizeof (Rawbyte *);
2362 } 2360 }
2363 else if (!(--count)) 2361 else if (!(--count))
2364 break; 2362 break;
2365 } 2363 }
2366 #endif /* not MC_ALLOC */ 2364 #endif /* not NEW_GC */
2367 2365
2368 /* Put the pdump_root_lisp_objects variables in place */ 2366 /* Put the pdump_root_lisp_objects variables in place */
2369 i = PDUMP_READ_ALIGNED (p, Elemcount); 2367 i = PDUMP_READ_ALIGNED (p, Elemcount);
2370 p = (Rawbyte *) ALIGN_PTR (p, pdump_static_Lisp_Object); 2368 p = (Rawbyte *) ALIGN_PTR (p, pdump_static_Lisp_Object);
2371 while (i--) 2369 while (i--)
2372 { 2370 {
2373 pdump_static_Lisp_Object obj = PDUMP_READ (p, pdump_static_Lisp_Object); 2371 pdump_static_Lisp_Object obj = PDUMP_READ (p, pdump_static_Lisp_Object);
2374 2372
2375 if (POINTER_TYPE_P (XTYPE (obj.value))) 2373 if (POINTER_TYPE_P (XTYPE (obj.value)))
2376 #ifdef MC_ALLOC 2374 #ifdef NEW_GC
2377 obj.value = wrap_pointer_1 ((Rawbyte *) pdump_get_mc_addr 2375 obj.value = wrap_pointer_1 ((Rawbyte *) pdump_get_mc_addr
2378 (XPNTR (obj.value))); 2376 (XPNTR (obj.value)));
2379 #else /* not MC_ALLOC */ 2377 #else /* not NEW_GC */
2380 obj.value = wrap_pointer_1 ((Rawbyte *) XPNTR (obj.value) + delta); 2378 obj.value = wrap_pointer_1 ((Rawbyte *) XPNTR (obj.value) + delta);
2381 #endif /* not MC_ALLOC */ 2379 #endif /* not NEW_GC */
2382 2380
2383 (* obj.address) = obj.value; 2381 (* obj.address) = obj.value;
2384 } 2382 }
2385 2383
2386 /* Final cleanups */ 2384 /* Final cleanups */
2400 } 2398 }
2401 else 2399 else
2402 p += sizeof (Lisp_Object) * rt.count; 2400 p += sizeof (Lisp_Object) * rt.count;
2403 } 2401 }
2404 2402
2405 #ifdef MC_ALLOC 2403 #ifdef NEW_GC
2406 xfree (pdump_mc_hash, mc_addr_elt *); 2404 xfree (pdump_mc_hash, mc_addr_elt *);
2407 #endif /* MC_ALLOC */ 2405 #endif /* NEW_GC */
2408 2406
2409 #ifdef NEW_GC 2407 #ifdef NEW_GC
2410 allow_incremental_gc = allow_inc_gc; 2408 allow_incremental_gc = allow_inc_gc;
2411 #endif /* NEW_GC */ 2409 #endif /* NEW_GC */
2412 2410
2746 2744
2747 if (pdump_file_try (exe_path)) 2745 if (pdump_file_try (exe_path))
2748 { 2746 {
2749 pdump_load_finish (); 2747 pdump_load_finish ();
2750 in_pdump = 0; 2748 in_pdump = 0;
2751 #ifdef MC_ALLOC 2749 #ifdef NEW_GC
2752 pdump_free (); 2750 pdump_free ();
2753 #endif /* MC_ALLOC */ 2751 #endif /* NEW_GC */
2754 return 1; 2752 return 1;
2755 } 2753 }
2756 2754
2757 #ifdef WIN32_NATIVE 2755 #ifdef WIN32_NATIVE
2758 if (pdump_resource_get ()) 2756 if (pdump_resource_get ())
2759 { 2757 {
2760 if (pdump_load_check ()) 2758 if (pdump_load_check ())
2761 { 2759 {
2762 pdump_load_finish (); 2760 pdump_load_finish ();
2763 in_pdump = 0; 2761 in_pdump = 0;
2764 #ifdef MC_ALLOC 2762 #ifdef NEW_GC
2765 pdump_free (); 2763 pdump_free ();
2766 #endif /* MC_ALLOC */ 2764 #endif /* NEW_GC */
2767 return 1; 2765 return 1;
2768 } 2766 }
2769 pdump_free (); 2767 pdump_free ();
2770 } 2768 }
2771 2769