$OpenBSD: patch-hotspot_src_os_cpu_bsd_amd64_vm_assembler_bsd_amd64_cpp,v 1.2 2007/07/13 22:52:35 kurt Exp $
--- hotspot/src/os_cpu/bsd_amd64/vm/assembler_bsd_amd64.cpp.orig	Fri Jul  6 08:51:56 2007
+++ hotspot/src/os_cpu/bsd_amd64/vm/assembler_bsd_amd64.cpp	Fri Jul  6 09:14:42 2007
@@ -72,5 +72,11 @@ void MacroAssembler::get_thread(Register thread) {
 // NOTE: since the bsd kernel resides at the low end of
 // user address space, no null pointer check is needed.
 bool MacroAssembler::needs_explicit_null_check(int offset) {
+#ifdef _ALLBSD_SOURCE
+  //XXXBSD: need to verify this. can page at 0 get mmaped?
+  bool offset_in_first_page =   0 <= offset  &&  offset < os::vm_page_size();
+  return !offset_in_first_page;
+#else
   return offset < 0 || offset >= 0x100000;
+#endif
 }
