Example #1
0
size_t JSStack::committedByteCount()
{
#if ENABLE(LLINT_C_LOOP)
    MutexLocker locker(stackStatisticsMutex());
    return committedBytesCount;
#else
    // When using the C stack, we don't know how many stack pages are actually
    // committed. So, we use the current stack usage as an estimate.
    ASSERT(wtfThreadData().stack().isGrowingDownward());
    int8_t* current = reinterpret_cast<int8_t*>(&current);
    int8_t* high = reinterpret_cast<int8_t*>(wtfThreadData().stack().origin());
    return high - current;
#endif
}
Example #2
0
void JSStack::initializeThreading()
{
    stackStatisticsMutex();
}
Example #3
0
void JSStack::addToCommittedByteCount(long byteCount)
{
    MutexLocker locker(stackStatisticsMutex());
    ASSERT(static_cast<long>(committedBytesCount) + byteCount > -1);
    committedBytesCount += byteCount;
}
size_t JSStack::committedByteCount()
{
    MutexLocker locker(stackStatisticsMutex());
    return committedBytesCount;
}