| Index: src/platform-win32.cc
|
| ===================================================================
|
| --- src/platform-win32.cc (revision 5002)
|
| +++ src/platform-win32.cc (working copy)
|
| @@ -223,6 +223,10 @@
|
| return ceil(x);
|
| }
|
|
|
| +
|
| +static Mutex* limit_mutex = NULL;
|
| +
|
| +
|
| #ifdef _WIN64
|
| typedef double (*ModuloFunction)(double, double);
|
|
|
| @@ -590,6 +594,7 @@
|
| // call this setup code within the same millisecond.
|
| uint64_t seed = static_cast<uint64_t>(TimeCurrentMillis());
|
| srand(static_cast<unsigned int>(seed));
|
| + limit_mutex = CreateMutex();
|
| }
|
|
|
|
|
| @@ -791,6 +796,9 @@
|
|
|
|
|
| static void UpdateAllocatedSpaceLimits(void* address, int size) {
|
| + ASSERT(limit_mutex != NULL);
|
| + ScopedLock lock(limit_mutex);
|
| +
|
| lowest_ever_allocated = Min(lowest_ever_allocated, address);
|
| highest_ever_allocated =
|
| Max(highest_ever_allocated,
|
|
|