(declaim (inline dynamic-usage))
#!+gencgc
(defun dynamic-usage ()
- (sb!alien:extern-alien "bytes_allocated" sb!alien:unsigned-long))
+ (sb!alien:extern-alien "bytes_allocated" os-vm-size-t))
#!-gencgc
(defun dynamic-usage ()
(the (unsigned-byte 32)
(native-pathname (cast val c-string)))))
(declaim (inline dynamic-space-size))
(defun dynamic-space-size ()
- (sb!alien:extern-alien "dynamic_space_size" sb!alien:unsigned-long)))
+ "Size of the dynamic space in bytes."
+ (sb!alien:extern-alien "dynamic_space_size" os-vm-size-t)))
\f
;;;; SUB-GC
(defun bytes-consed-between-gcs ()
#!+sb-doc
"The amount of memory that will be allocated before the next garbage
-collection is initiated. This can be set with SETF."
- (sb!alien:extern-alien "bytes_consed_between_gcs"
- (sb!alien:unsigned 32)))
+collection is initiated. This can be set with SETF.
+
+On GENCGC platforms this is the nursery size, and defaults to 5% of dynamic
+space size.
+
+Note: currently changes to this value are lost when saving core."
+ (sb!alien:extern-alien "bytes_consed_between_gcs" os-vm-size-t))
(defun (setf bytes-consed-between-gcs) (val)
(declare (type index val))
- (setf (sb!alien:extern-alien "bytes_consed_between_gcs"
- (sb!alien:unsigned 32))
+ (setf (sb!alien:extern-alien "bytes_consed_between_gcs" os-vm-size-t)
val))
(declaim (inline maybe-handle-pending-gc))
(alloc-unboxed-start-page page-index-t)
(alloc-large-start-page page-index-t)
(alloc-large-unboxed-start-page page-index-t)
- (bytes-allocated unsigned-long)
- (gc-trigger unsigned-long)
- (bytes-consed-between-gcs unsigned-long)
+ (bytes-allocated os-vm-size-t)
+ (gc-trigger os-vm-size-t)
+ (bytes-consed-between-gcs os-vm-size-t)
(number-of-gcs int)
(number-of-gcs-before-promotion int)
- (cum-sum-bytes-allocated unsigned-long)
+ (cum-sum-bytes-allocated os-vm-size-t)
(minimum-age-before-gc double)))
#!+gencgc
"Number of bytes that can be allocated to GENERATION before that
generation is considered for garbage collection. This value is meaningless for
generation 0 (the nursery): see BYTES-CONSED-BETWEEN-GCS instead. Default is
-20Mb. Can be assigned to using SETF. Available on GENCGC platforms only.
+5% of the dynamic space size. Can be assigned to using SETF. Available on
+GENCGC platforms only.
Experimental: interface subject to change."
t)