440 // a GC is induced and the value is increased. Size is in bytes.
441 static volatile size_t _capacity_until_GC;
442
443 // For a CMS collection, signal that a concurrent collection should
444 // be started.
445 static bool _should_concurrent_collect;
446
447 static uint _shrink_factor;
448
449 static size_t shrink_factor() { return _shrink_factor; }
450 void set_shrink_factor(uint v) { _shrink_factor = v; }
451
452 public:
453
454 static void initialize();
455 static void post_initialize();
456
457 static size_t capacity_until_GC();
458 static bool inc_capacity_until_GC(size_t v,
459 size_t* new_cap_until_GC = NULL,
460 size_t* old_cap_until_GC = NULL);
461 static size_t dec_capacity_until_GC(size_t v);
462
463 static bool should_concurrent_collect() { return _should_concurrent_collect; }
464 static void set_should_concurrent_collect(bool v) {
465 _should_concurrent_collect = v;
466 }
467
468 // The amount to increase the high-water-mark (_capacity_until_GC)
469 static size_t delta_capacity_until_GC(size_t bytes);
470
471 // Tells if we have can expand metaspace without hitting set limits.
472 static bool can_expand(size_t words, bool is_class);
473
474 // Returns amount that we can expand without hitting a GC,
475 // measured in words.
476 static size_t allowed_expansion();
477
478 // Calculate the new high-water mark at which to induce
479 // a GC.
480 static void compute_new_size();
|
440 // a GC is induced and the value is increased. Size is in bytes.
441 static volatile size_t _capacity_until_GC;
442
443 // For a CMS collection, signal that a concurrent collection should
444 // be started.
445 static bool _should_concurrent_collect;
446
447 static uint _shrink_factor;
448
449 static size_t shrink_factor() { return _shrink_factor; }
450 void set_shrink_factor(uint v) { _shrink_factor = v; }
451
452 public:
453
454 static void initialize();
455 static void post_initialize();
456
457 static size_t capacity_until_GC();
458 static bool inc_capacity_until_GC(size_t v,
459 size_t* new_cap_until_GC = NULL,
460 size_t* old_cap_until_GC = NULL,
461 bool* can_retry = NULL);
462 static size_t dec_capacity_until_GC(size_t v);
463
464 static bool should_concurrent_collect() { return _should_concurrent_collect; }
465 static void set_should_concurrent_collect(bool v) {
466 _should_concurrent_collect = v;
467 }
468
469 // The amount to increase the high-water-mark (_capacity_until_GC)
470 static size_t delta_capacity_until_GC(size_t bytes);
471
472 // Tells if we have can expand metaspace without hitting set limits.
473 static bool can_expand(size_t words, bool is_class);
474
475 // Returns amount that we can expand without hitting a GC,
476 // measured in words.
477 static size_t allowed_expansion();
478
479 // Calculate the new high-water mark at which to induce
480 // a GC.
481 static void compute_new_size();
|