Index: src/spaces.h |
diff --git a/src/spaces.h b/src/spaces.h |
index 165a226219a7fce26f1fd942db55a618b388f19c..b47452e421feeb5c61f8f083d908956eae99a046 100644 |
--- a/src/spaces.h |
+++ b/src/spaces.h |
@@ -1444,9 +1444,12 @@ class FreeListCategory { |
FreeListCategory() : |
top_(NULL), |
end_(NULL), |
+ mutex_(OS::CreateMutex()), |
available_(0) {} |
- ~FreeListCategory() {} |
+ ~FreeListCategory() { |
+ delete mutex_; |
+ } |
intptr_t Concatenate(FreeListCategory* category); |
@@ -1473,7 +1476,7 @@ class FreeListCategory { |
int available() const { return available_; } |
void set_available(int available) { available_ = available; } |
- Mutex* mutex() { return &mutex_; } |
+ Mutex* mutex() { return mutex_; } |
#ifdef DEBUG |
intptr_t SumFreeList(); |
@@ -1483,7 +1486,7 @@ class FreeListCategory { |
private: |
FreeListNode* top_; |
FreeListNode* end_; |
- Mutex mutex_; |
+ Mutex* mutex_; |
// Total available bytes in all blocks of this free list category. |
int available_; |