X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fx86-64%2Fbackend-parms.lisp;h=93f2e017911678ed564a862e32103d500cee4bb8;hb=33179e55e91c2584641436a59aa18c13aee09da7;hp=1ef5f6fb4a145cb2fbb79973f0c9512570e59b69;hpb=78fa16bf55be44cc16845be84d98023e83fb14bc;p=sbcl.git diff --git a/src/compiler/x86-64/backend-parms.lisp b/src/compiler/x86-64/backend-parms.lisp index 1ef5f6f..93f2e01 100644 --- a/src/compiler/x86-64/backend-parms.lisp +++ b/src/compiler/x86-64/backend-parms.lisp @@ -28,24 +28,26 @@ ;;; general have our C runtime code running to ask, so instead we set ;;; it by hand. -- WHN 2001-04-15 ;;; -;;; Though note that POSIX specifies (as far as I can tell) -;;; -;;; sysconf(_SC_PAGE_SIZE); -;;; -;;; as a portable way of retrieving this information; a call to this -;;; could be made in grovel-headers (which, strictly speaking, would -;;; no longer solely be grovelling headers), though the question of -;;; how to make this information appear in GENESIS, which is built and -;;; run from host-1 files (which are made before grovel-headers runs) -;;; would remain. -- CSR, 2002-09-01 -(setf *backend-page-size* 4096) -;;; comment from CMU CL: -;;; -;;; in case we ever wanted to do this for Windows NT.. -;;; -;;; Windows NT uses a memory system granularity of 64K, which means -;;; everything that gets mapped must be a multiple of that. The real -;;; page size is 512, but that doesn't do us a whole lot of good. -;;; Effectively, the page size is 64K. -;;; -;;; would be: (setf *backend-page-size* 65536) +;;; Actually any information that we can retrieve C-side would be +;;; useless in SBCL, since it's possible for otherwise binary +;;; compatible systems to return different values for getpagesize(). +;;; -- JES, 2007-01-06 +(eval-when (:compile-toplevel :load-toplevel :execute) + (setf *backend-page-bytes* 32768)) + +;;; The size in bytes of GENCGC cards, i.e. the granularity at which +;;; writes to old generations are logged. With mprotect-based write +;;; barriers, this must be a multiple of the OS page size. +(def!constant gencgc-card-bytes *backend-page-bytes*) +;;; The minimum size of new allocation regions. While it doesn't +;;; currently make a lot of sense to have a card size lower than +;;; the alloc granularity, it will, once we are smarter about finding +;;; the start of objects. +(def!constant gencgc-alloc-granularity 0) +;;; The minimum size at which we release address ranges to the OS. +;;; This must be a multiple of the OS page size. +(def!constant gencgc-release-granularity *backend-page-bytes*) + +#!+sb-safepoint +(def!constant thread-saved-csp-offset + (- (/ *backend-page-bytes* n-word-bytes)))