RTC to 1.7: fix for hs16 + zero
Edward Nevill
ed at camswl.com
Fri Jan 15 09:12:26 PST 2010
Hi folks,
Attached is a fix for building hs16 on zero. As far as I can tell it is broken on all zero platforms, whether or not they build with Shark.
The problem is simply that the function is_allocatable in os_linux_zero.cpp is unimplemeted. Now hs14 did not call this but hs16 does seem to call it.
The 'fix' I have implemented is simply to copy the implementation from os_linux_x86.cpp to os_linux_zero.cpp.
I have tested this with the test_gamma but have not done any further testing as I will have to do a complete rebuild to test it fully.
(it cannot be worse than the current implemetation which just called ShouldNotCallThis()).
Ok to commit?
Regards,
Ed.
--- CUT HERE ---
diff -ruNE old/icedtea6-1.7/ChangeLog new/icedtea6-1.7/ChangeLog
--- old/icedtea6-1.7/ChangeLog 2010-01-15 16:57:45.000000000 +0000
+++ new/icedtea6-1.7/ChangeLog 2010-01-15 17:02:23.000000000 +0000
@@ -1,3 +1,8 @@
+2010-01-15 Edard Nevill <ed at camswl.com>
+
+ * ports/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.cpp
+ Implement is_allocatable to make build word with hs16
+
2010-01-14 Matthias Klose <doko at ubuntu.com>
* Makefile.am (stamps/icedtea-npplugin): New target, add file
diff -ruNE old/icedtea6-1.7/ports/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.cpp new/icedtea6-1.7/ports/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.cpp
--- old/icedtea6-1.7/ports/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.cpp 2010-01-15 16:57:47.000000000 +0000
+++ new/icedtea6-1.7/ports/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.cpp 2010-01-15 16:59:56.000000000 +0000
@@ -249,7 +249,23 @@
}
bool os::is_allocatable(size_t bytes) {
- ShouldNotCallThis();
+#ifdef AMD64
+ // unused on amd64?
+ return true;
+#else
+
+ if (bytes < 2 * G) {
+ return true;
+ }
+
+ char* addr = reserve_memory(bytes, NULL);
+
+ if (addr != NULL) {
+ release_memory(addr, bytes);
+ }
+
+ return addr != NULL;
+#endif // AMD64
}
///////////////////////////////////////////////////////////////////////////////
More information about the distro-pkg-dev
mailing list