342 // Calculates optimal (free) space sizes for both the young and old |
342 // Calculates optimal (free) space sizes for both the young and old |
343 // generations. Stores results in _eden_size and _promo_size. |
343 // generations. Stores results in _eden_size and _promo_size. |
344 // Takes current used space in all generations as input, as well |
344 // Takes current used space in all generations as input, as well |
345 // as an indication if a full gc has just been performed, for use |
345 // as an indication if a full gc has just been performed, for use |
346 // in deciding if an OOM error should be thrown. |
346 // in deciding if an OOM error should be thrown. |
347 void compute_generation_free_space(size_t young_live, |
347 void compute_generations_free_space(size_t young_live, |
348 size_t eden_live, |
348 size_t eden_live, |
349 size_t old_live, |
349 size_t old_live, |
350 size_t cur_eden, // current eden in bytes |
350 size_t cur_eden, // current eden in bytes |
351 size_t max_old_gen_size, |
351 size_t max_old_gen_size, |
352 size_t max_eden_size, |
352 size_t max_eden_size, |
353 bool is_full_gc); |
353 bool is_full_gc); |
354 |
354 |
355 void compute_eden_space_size(size_t young_live, |
355 void compute_eden_space_size(size_t young_live, |
356 size_t eden_live, |
356 size_t eden_live, |
357 size_t cur_eden, // current eden in bytes |
357 size_t cur_eden, // current eden in bytes |
358 size_t max_eden_size, |
358 size_t max_eden_size, |