Changeset 67130 in webkit for trunk/JavaScriptCore/jit
- Timestamp:
- Sep 9, 2010, 5:21:43 PM (15 years ago)
- Location:
- trunk/JavaScriptCore/jit
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/jit/ExecutableAllocator.h
r66150 r67130 298 298 #error "The cacheFlush support is missing on this platform." 299 299 #endif 300 static size_t committedByteCount(); 300 301 301 302 private: -
trunk/JavaScriptCore/jit/ExecutableAllocatorFixedVMPool.cpp
r66150 r67130 55 55 56 56 namespace JSC { 57 58 static size_t committedBytesCount = 0; 59 static SpinLock spinlock = SPINLOCK_INITIALIZER; 57 60 58 61 // FreeListEntry describes a free chunk of memory, stored in the freeList. … … 129 132 { 130 133 m_allocation.decommit(position, size); 134 addToCommittedByteCount(-static_cast<long>(size)); 131 135 } 132 136 … … 135 139 bool okay = m_allocation.commit(position, size); 136 140 ASSERT_UNUSED(okay, okay); 141 addToCommittedByteCount(static_cast<long>(size)); 137 142 } 138 143 … … 416 421 #endif 417 422 423 void addToCommittedByteCount(long byteCount) 424 { 425 ASSERT(spinlock.IsHeld()); 426 ASSERT(static_cast<long>(committedBytesCount) + byteCount > -1); 427 committedBytesCount += byteCount; 428 } 429 418 430 // Freed space from the most common sized allocations will be held in this list, ... 419 431 const size_t m_commonSize; … … 429 441 }; 430 442 443 size_t ExecutableAllocator::committedByteCount() 444 { 445 SpinLockHolder lockHolder(&spinlock); 446 return committedBytesCount; 447 } 448 431 449 void ExecutableAllocator::intializePageSize() 432 450 { … … 435 453 436 454 static FixedVMPoolAllocator* allocator = 0; 437 static SpinLock spinlock = SPINLOCK_INITIALIZER; 438 455 439 456 bool ExecutableAllocator::isValid() const 440 457 {
Note:
See TracChangeset
for help on using the changeset viewer.