@@ -687,7 +687,7 @@ class ConservativeGC : GC
687
687
debug (PRINTF ) printFreeInfo(pool);
688
688
memset(&lpool.pagetable[pagenum + psz], B_PAGEPLUS , newPages);
689
689
lpool.bPageOffsets[pagenum] = cast (uint ) newsz;
690
- for (auto offset = psz + 1 ; offset < newsz; offset++ )
690
+ for (auto offset = psz; offset < newsz; offset++ )
691
691
lpool.bPageOffsets[pagenum + offset] = cast (uint ) offset;
692
692
if (freesz > newPages)
693
693
lpool.setFreePageOffsets(pagenum + newsz, freesz - newPages);
@@ -1427,6 +1427,10 @@ struct Gcx
1427
1427
// printf("Gcx.invariant(): this = %p\n", &this);
1428
1428
pooltable.Invariant();
1429
1429
1430
+ for (size_t p = 0 ; p < pooltable.length; p++ )
1431
+ if (pooltable.pools[p].isLargeObject)
1432
+ (cast (LargeObjectPool* )(pooltable.pools[p])).Invariant();
1433
+
1430
1434
if (! inCollection)
1431
1435
(cast ()rangesLock).lock();
1432
1436
foreach (range; ranges)
@@ -2521,7 +2525,7 @@ struct Gcx
2521
2525
LogArray prev;
2522
2526
2523
2527
2524
- void log_init ()
2528
+ private void log_init ()
2525
2529
{
2526
2530
// debug(PRINTF) printf("+log_init()\n");
2527
2531
current.reserve (1000 );
@@ -2530,7 +2534,7 @@ struct Gcx
2530
2534
}
2531
2535
2532
2536
2533
- void log_malloc (void * p, size_t size) nothrow
2537
+ private void log_malloc (void * p, size_t size) nothrow
2534
2538
{
2535
2539
// debug(PRINTF) printf("+log_malloc(p = %p, size = %zd)\n", p, size);
2536
2540
Log log;
@@ -2549,7 +2553,7 @@ struct Gcx
2549
2553
}
2550
2554
2551
2555
2552
- void log_free (void * p) nothrow @nogc
2556
+ private void log_free (void * p) nothrow @nogc
2553
2557
{
2554
2558
// debug(PRINTF) printf("+log_free(%p)\n", p);
2555
2559
auto i = current.find(p);
@@ -2563,7 +2567,7 @@ struct Gcx
2563
2567
}
2564
2568
2565
2569
2566
- void log_collect () nothrow
2570
+ private void log_collect () nothrow
2567
2571
{
2568
2572
// debug(PRINTF) printf("+log_collect()\n");
2569
2573
// Print everything in current that is not in prev
@@ -2598,7 +2602,7 @@ struct Gcx
2598
2602
}
2599
2603
2600
2604
2601
- void log_parent (void * p, void * parent) nothrow
2605
+ private void log_parent (void * p, void * parent) nothrow
2602
2606
{
2603
2607
// debug(PRINTF) printf("+log_parent()\n");
2604
2608
auto i = current.find(p);
@@ -2625,11 +2629,11 @@ struct Gcx
2625
2629
}
2626
2630
else
2627
2631
{
2628
- void log_init () nothrow { }
2629
- void log_malloc (void * p, size_t size) nothrow { }
2630
- void log_free (void * p) nothrow @nogc { }
2631
- void log_collect () nothrow { }
2632
- void log_parent (void * p, void * parent) nothrow { }
2632
+ private void log_init () nothrow { }
2633
+ private void log_malloc (void * p, size_t size) nothrow { }
2634
+ private void log_free (void * p) nothrow @nogc { }
2635
+ private void log_collect () nothrow { }
2636
+ private void log_parent (void * p, void * parent) nothrow { }
2633
2637
}
2634
2638
}
2635
2639
0 commit comments