| Index: src/platform-linux.cc
|
| ===================================================================
|
| --- src/platform-linux.cc (revision 5002)
|
| +++ src/platform-linux.cc (working copy)
|
| @@ -72,6 +72,9 @@
|
| }
|
|
|
|
|
| +static Mutex* limit_mutex = NULL;
|
| +
|
| +
|
| void OS::Setup() {
|
| // Seed the random number generator.
|
| // Convert the current time to a 64-bit integer first, before converting it
|
| @@ -80,6 +83,7 @@
|
| // call this setup code within the same millisecond.
|
| uint64_t seed = static_cast<uint64_t>(TimeCurrentMillis());
|
| srandom(static_cast<unsigned int>(seed));
|
| + limit_mutex = CreateMutex();
|
| }
|
|
|
|
|
| @@ -215,6 +219,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,
|
|
|