. Avoid memory corruption on FreeBSD 4.x. This seems to have no affect

under 5.x which was running fine without it.

Approved by:	phantom
This commit is contained in:
Greg Lewis
2005-06-22 15:52:02 +00:00
parent 04c2c2c20a
commit 0ffef58133
2 changed files with 36 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
$FreeBSD$
--- ../../hotspot/src/os/bsd/vm/os_bsd.inline.hpp 20 Dec 2004 10:06:24 -0000 1.2
+++ ../../hotspot/src/os/bsd/vm/os_bsd.inline.hpp 14 May 2005 14:58:18 -0000 1.3
@@ -29,10 +29,9 @@
inline bool os::allocate_stack_guard_pages() {
assert(uses_stack_guard_pages(), "sanity check");
-// XXXBSD: ??
-// return thr_main();
-// return pthread_main_np();
- return true;
+ // Since FreeBSD 4 uses malloc() for allocating the thread stack
+ // there is no need to do anything extra to allocate the guard pages
+ return false;
}

View File

@@ -0,0 +1,18 @@
$FreeBSD$
--- ../../hotspot/src/os/bsd/vm/os_bsd.inline.hpp 20 Dec 2004 10:06:24 -0000 1.2
+++ ../../hotspot/src/os/bsd/vm/os_bsd.inline.hpp 14 May 2005 14:58:18 -0000 1.3
@@ -29,10 +29,9 @@
inline bool os::allocate_stack_guard_pages() {
assert(uses_stack_guard_pages(), "sanity check");
-// XXXBSD: ??
-// return thr_main();
-// return pthread_main_np();
- return true;
+ // Since FreeBSD 4 uses malloc() for allocating the thread stack
+ // there is no need to do anything extra to allocate the guard pages
+ return false;
}