Mercurial > hg > truffle
diff src/share/vm/memory/metachunk.hpp @ 7446:e51c9860cf66
8005082: NPG: Add specialized Metachunk sizes for reflection and anonymous classloaders
Reviewed-by: johnc, coleenp
author | jmasa |
---|---|
date | Mon, 03 Dec 2012 15:09:39 -0800 |
parents | 90273fc0a981 |
children | c23dbf0e8ab7 |
line wrap: on
line diff
--- a/src/share/vm/memory/metachunk.hpp Fri Dec 21 10:27:49 2012 -0800 +++ b/src/share/vm/memory/metachunk.hpp Mon Dec 03 15:09:39 2012 -0800 @@ -67,9 +67,11 @@ void set_word_size(size_t v) { _word_size = v; } public: #ifdef ASSERT - Metachunk() : _bottom(NULL), _end(NULL), _top(NULL), _is_free(false) {} + Metachunk() : _bottom(NULL), _end(NULL), _top(NULL), _is_free(false), + _next(NULL), _prev(NULL) {} #else - Metachunk() : _bottom(NULL), _end(NULL), _top(NULL) {} + Metachunk() : _bottom(NULL), _end(NULL), _top(NULL), + _next(NULL), _prev(NULL) {} #endif // Used to add a Metachunk to a list of Metachunks @@ -102,15 +104,15 @@ } // Reset top to bottom so chunk can be reused. - void reset_empty() { _top = (_bottom + _overhead); } + void reset_empty() { _top = (_bottom + _overhead); _next = NULL; _prev = NULL; } bool is_empty() { return _top == (_bottom + _overhead); } // used (has been allocated) // free (available for future allocations) // capacity (total size of chunk) - size_t used_word_size(); - size_t free_word_size(); - size_t capacity_word_size(); + size_t used_word_size() const; + size_t free_word_size() const; + size_t capacity_word_size()const; // Debug support #ifdef ASSERT