Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(414)

Unified Diff: src/platform-openbsd.cc

Issue 435003: Patch for allowing several V8 instances in process:... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/platform-macos.cc ('k') | src/platform-win32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/platform-openbsd.cc
===================================================================
--- src/platform-openbsd.cc (revision 3427)
+++ src/platform-openbsd.cc (working copy)
@@ -102,8 +102,10 @@
static void* lowest_ever_allocated = reinterpret_cast<void*>(-1);
static void* highest_ever_allocated = reinterpret_cast<void*>(0);
+static MutexLockAdapter heap_limits_lock(OS::CreateMutex());
static void UpdateAllocatedSpaceLimits(void* address, int size) {
+ V8SharedStateLocker heap_limits_locker(&heap_limits_lock);
lowest_ever_allocated = Min(lowest_ever_allocated, address);
highest_ever_allocated =
Max(highest_ever_allocated,
@@ -112,6 +114,7 @@
bool OS::IsOutsideAllocatedSpace(void* address) {
+ V8SharedStateLocker heap_limits_locker(&heap_limits_lock);
return address < lowest_ever_allocated || address >= highest_ever_allocated;
}
« no previous file with comments | « src/platform-macos.cc ('k') | src/platform-win32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698