comparison src/share/vm/utilities/bitMap.hpp @ 10992:b9d151496930

8016556: G1: Use ArrayAllocator for BitMaps Reviewed-by: tschatzl, dholmes, coleenp, johnc
author brutisso
date Tue, 18 Jun 2013 22:45:32 +0200
parents 7b835924c31c
children de6a9e811145
comparison
equal deleted inserted replaced
10991:01522ca68fc7 10992:b9d151496930
46 typedef enum { 46 typedef enum {
47 unknown_range, small_range, large_range 47 unknown_range, small_range, large_range
48 } RangeSizeHint; 48 } RangeSizeHint;
49 49
50 private: 50 private:
51 ArrayAllocator<bm_word_t, mtInternal> _map_allocator;
51 bm_word_t* _map; // First word in bitmap 52 bm_word_t* _map; // First word in bitmap
52 idx_t _size; // Size of bitmap (in bits) 53 idx_t _size; // Size of bitmap (in bits)
53 54
54 // Puts the given value at the given offset, using resize() to size 55 // Puts the given value at the given offset, using resize() to size
55 // the bitmap appropriately if needed using factor-of-two expansion. 56 // the bitmap appropriately if needed using factor-of-two expansion.
111 static idx_t num_set_bits_from_table(unsigned char c); 112 static idx_t num_set_bits_from_table(unsigned char c);
112 113
113 public: 114 public:
114 115
115 // Constructs a bitmap with no map, and size 0. 116 // Constructs a bitmap with no map, and size 0.
116 BitMap() : _map(NULL), _size(0) {} 117 BitMap() : _map(NULL), _size(0), _map_allocator(false) {}
117 118
118 // Constructs a bitmap with the given map and size. 119 // Constructs a bitmap with the given map and size.
119 BitMap(bm_word_t* map, idx_t size_in_bits); 120 BitMap(bm_word_t* map, idx_t size_in_bits);
120 121
121 // Constructs an empty bitmap of the given size (that is, this clears the 122 // Constructs an empty bitmap of the given size (that is, this clears the