1
0
forked from mirrors/0ad

Actually remove trailing tabs from source/.

This was SVN commit r18991.
This commit is contained in:
elexis
2016-11-23 14:09:58 +00:00
parent c49c665edb
commit 417c84870c
166 changed files with 955 additions and 955 deletions
+12 -12
View File
@@ -70,21 +70,21 @@ void GCSliceCallbackHook(JSRuntime* UNUSED(rt), JS::GCProgress progress, const J
const char16_t* str = desc.formatMessage(rt);
int len = 0;
for(int i = 0; i < 10000; i++)
{
len++;
if(!str[i])
break;
}
wchar_t outstring[len];
for(int i = 0; i < len; i++)
{
outstring[i] = (wchar_t)str[i];
}
printf("---------------------------------------\n: %ls \n---------------------------------------\n", outstring);
#endif
}
@@ -155,7 +155,7 @@ void ScriptRuntime::UnRegisterContext(JSContext* cx)
void ScriptRuntime::MaybeIncrementalGC(double delay)
{
PROFILE2("MaybeIncrementalGC");
if (JS::IsIncrementalGCEnabled(m_rt))
{
// The idea is to get the heap size after a completed GC and trigger the next GC when the heap size has
@@ -165,22 +165,22 @@ void ScriptRuntime::MaybeIncrementalGC(double delay)
// While the sweeping is happening we already run scripts again and produce new garbage.
const int GCSliceTimeBudget = 30; // Milliseconds an incremental slice is allowed to run
// Have a minimum time in seconds to wait between GC slices and before starting a new GC to distribute the GC
// load and to hopefully make it unnoticeable for the player. This value should be high enough to distribute
// the load well enough and low enough to make sure we don't run out of memory before we can start with the
// sweeping.
if (timer_Time() - m_LastGCCheck < delay)
return;
m_LastGCCheck = timer_Time();
int gcBytes = JS_GetGCParameter(m_rt, JSGC_BYTES);
#if GC_DEBUG_PRINT
std::cout << "gcBytes: " << gcBytes / 1024 << " KB" << std::endl;
#endif
if (m_LastGCBytes > gcBytes || m_LastGCBytes == 0)
{
#if GC_DEBUG_PRINT
@@ -193,7 +193,7 @@ void ScriptRuntime::MaybeIncrementalGC(double delay)
// ... or
// start a new incremental GC if the JS heap size has grown enough for a GC to make sense
if (JS::IsIncrementalGCInProgress(m_rt) || (gcBytes - m_LastGCBytes > m_HeapGrowthBytesGCTrigger))
{
{
#if GC_DEBUG_PRINT
if (JS::IsIncrementalGCInProgress(m_rt))
printf("An incremental GC cycle is in progress. \n");
@@ -204,7 +204,7 @@ void ScriptRuntime::MaybeIncrementalGC(double delay)
m_LastGCBytes / 1024,
m_HeapGrowthBytesGCTrigger / 1024);
#endif
// A hack to make sure we never exceed the runtime size because we can't collect the memory
// fast enough.
if (gcBytes > m_RuntimeSize / 2)