Make v8 pre-allocate at least 32M of virtual memory to avoid

crashing with vmmap. This is needed because of their JIT is
not fully 64-bit.
This commit is contained in:
robert 2011-05-31 07:55:04 +00:00
parent 803dd6b93b
commit ba1ed4f32a
4 changed files with 28 additions and 26 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.50 2011/05/26 11:39:14 robert Exp $
# $OpenBSD: Makefile,v 1.51 2011/05/31 07:55:04 robert Exp $
ONLY_FOR_ARCHS= i386 amd64
@ -7,7 +7,7 @@ COMMENT= Chromium browser
V= 11.0.696.71
DISTNAME= chromium-${V}
REVISION= 0
REVISION= 1
CATEGORIES= www

View File

@ -1,12 +1,12 @@
$OpenBSD: patch-v8_src_heap_cc,v 1.1 2011/05/17 08:35:31 robert Exp $
--- v8/src/heap.cc.orig Mon May 16 17:04:03 2011
+++ v8/src/heap.cc Mon May 16 17:07:18 2011
@@ -87,7 +87,7 @@ intptr_t Heap::max_old_generation_size_ = 192*MB;
int Heap::initial_semispace_size_ = 128*KB;
intptr_t Heap::code_range_size_ = 0;
intptr_t Heap::max_executable_size_ = max_old_generation_size_;
-#elif defined(V8_TARGET_ARCH_X64)
+#elif defined(V8_TARGET_ARCH_X64) && !defined(__OpenBSD__)
$OpenBSD: patch-v8_src_heap_cc,v 1.2 2011/05/31 07:55:04 robert Exp $
--- v8/src/heap.cc.orig Fri May 20 10:56:51 2011
+++ v8/src/heap.cc Mon May 30 23:09:01 2011
@@ -91,7 +91,7 @@ intptr_t Heap::max_executable_size_ = max_old_generati
static const int default_max_semispace_size_ = 16*MB;
intptr_t Heap::max_old_generation_size_ = 1*GB;
int Heap::initial_semispace_size_ = 1*MB;
-intptr_t Heap::code_range_size_ = 512*MB;
+intptr_t Heap::code_range_size_ = 32*MB;
intptr_t Heap::max_executable_size_ = 256*MB;
#else
static const int default_max_semispace_size_ = 8*MB;

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.13 2011/05/21 20:32:54 sthen Exp $
# $OpenBSD: Makefile,v 1.14 2011/05/31 07:55:16 robert Exp $
# XXX:
# - Needs __ARM_NR_cacheflush (or the like) to work on arm-based ports.
@ -11,14 +11,16 @@ COMMENT= V8 JavaScript for clients and servers
DISTNAME= node-v0.4.8
PKGNAME= ${DISTNAME:S/v//g}
REVISION= 0
CATEGORIES= www devel
HOMEPAGE= http://nodejs.org/
# MIT
PERMIT_PACKAGE_CDROM= Yes
PERMIT_PACKAGE_FTP= Yes
PERMIT_DISTFILES_CDROM= Yes
PERMIT_PACKAGE_CDROM= Yes
PERMIT_PACKAGE_FTP= Yes
PERMIT_DISTFILES_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
MASTER_SITES= ${HOMEPAGE}/dist/

View File

@ -1,16 +1,16 @@
$OpenBSD: patch-deps_v8_src_heap_cc,v 1.1 2011/05/21 20:32:54 sthen Exp $
$OpenBSD: patch-deps_v8_src_heap_cc,v 1.2 2011/05/31 07:55:16 robert Exp $
Don't allocate a huge chunk of VM upfront on amd64, use the same allocation
policy as done on i386.
Don't allocate a huge chunk of VM upfront on amd64, but still use a bigger
code range size to avoid crashing with vmmap.
--- deps/v8/src/heap.cc.orig Sat May 21 09:07:11 2011
+++ deps/v8/src/heap.cc Sat May 21 09:07:31 2011
@@ -87,7 +87,7 @@ intptr_t Heap::max_old_generation_size_ = 192*MB;
int Heap::initial_semispace_size_ = 128*KB;
intptr_t Heap::code_range_size_ = 0;
intptr_t Heap::max_executable_size_ = max_old_generation_size_;
-#elif defined(V8_TARGET_ARCH_X64)
+#elif defined(V8_TARGET_ARCH_X64) && !defined(__OpenBSD__)
--- deps/v8/src/heap.cc.orig Sat May 21 04:40:06 2011
+++ deps/v8/src/heap.cc Mon May 30 22:57:26 2011
@@ -91,7 +91,7 @@ intptr_t Heap::max_executable_size_ = max_old_generati
static const int default_max_semispace_size_ = 16*MB;
intptr_t Heap::max_old_generation_size_ = 1*GB;
int Heap::initial_semispace_size_ = 1*MB;
-intptr_t Heap::code_range_size_ = 512*MB;
+intptr_t Heap::code_range_size_ = 32*MB;
intptr_t Heap::max_executable_size_ = 256*MB;
#else
static const int default_max_semispace_size_ = 8*MB;