$OpenBSD: patch-hotspot_src_os_cpu_bsd_x86_vm_assembler_bsd_x86_64_cpp,v 1.1 2008/03/19 18:05:43 kurt Exp $
--- hotspot/src/os_cpu/bsd_x86/vm/assembler_bsd_x86_64.cpp.orig	Wed Nov  7 13:30:38 2007
+++ hotspot/src/os_cpu/bsd_x86/vm/assembler_bsd_x86_64.cpp	Wed Nov  7 13:31:11 2007
@@ -69,5 +69,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
 }
