systems with getaddrinfo().
** GET-HOST-BY-NAME and GET-HOST-BY-ADDRESS weren't thread or interrupt
safe outside systems with getaddrinfo().
+ * bug fix: on 64-bit systems setting the nursery size above 4Gb now works.
+ (lp#870868)
changes in sbcl-1.0.53 relative to sbcl-1.0.52:
* enhancement: on 64-bit targets, in src/compiler/generic/early-vm.lisp,
(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)))
+ (sb!alien:extern-alien "dynamic_space_size" os-vm-size-t)))
\f
;;;; SUB-GC
#!+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)))
+ (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
long (*sizetab[256])(lispobj *where);
struct weak_pointer *weak_pointers;
-unsigned long bytes_consed_between_gcs = 12*1024*1024;
-
+os_vm_size_t bytes_consed_between_gcs = 12*1024*1024;
/*
* copying objects
extern boolean maybe_gc(os_context_t *context);
-extern unsigned long bytes_consed_between_gcs;
+extern os_vm_size_t bytes_consed_between_gcs;
#endif /* _GC_H_ */
*/
/* the total bytes allocated. These are seen by Lisp DYNAMIC-USAGE. */
-unsigned long bytes_allocated = 0;
-unsigned long auto_gc_trigger = 0;
+os_vm_size_t bytes_allocated = 0;
+os_vm_size_t auto_gc_trigger = 0;
/* the source and destination generations. These are set before a GC starts
* scavenging. */
page_index_t alloc_large_unboxed_start_page;
/* the bytes allocated to this generation */
- unsigned long bytes_allocated;
+ os_vm_size_t bytes_allocated;
/* the number of bytes at which to trigger a GC */
- unsigned long gc_trigger;
+ os_vm_size_t gc_trigger;
/* to calculate a new level for gc_trigger */
- unsigned long bytes_consed_between_gc;
+ os_vm_size_t bytes_consed_between_gc;
/* the number of GCs since the last raise */
int num_gc;
* objects are added from a GC of a younger generation. Dividing by
* the bytes_allocated will give the average age of the memory in
* this generation since its last GC. */
- unsigned long cum_sum_bytes_allocated;
+ os_vm_size_t cum_sum_bytes_allocated;
/* a minimum average memory age before a GC will occur helps
* prevent a GC when a large number of new live objects have been
generations[i].num_gc,
generation_average_age(i));
}
- fprintf(file," Total bytes allocated = %lu\n", bytes_allocated);
+ fprintf(file," Total bytes allocated = %lu\n", (unsigned long)bytes_allocated);
fprintf(file," Dynamic-space-size bytes = %lu\n", (unsigned long)dynamic_space_size);
fpu_restore(fpu_state);
/* As a check re-scavenge the newspace once; no new objects should
* be found. */
{
- long old_bytes_allocated = bytes_allocated;
- long bytes_allocated;
+ os_vm_size_t old_bytes_allocated = bytes_allocated;
+ os_vm_size_t bytes_allocated;
/* Start with a full scavenge. */
scavenge_newspace_generation_one_scan(new_space);
printf("\n");
#endif
+ printf("(in-package \"SB!KERNEL\")\n\n");
#ifdef LISP_FEATURE_GENCGC
printf(";;; GENCGC related\n");
- printf("(in-package \"SB!KERNEL\")\n");
DEFTYPE("page-index-t", page_index_t);
DEFTYPE("generation-index-t", generation_index_t);
printf("\n");
#endif
+ printf(";;; Our runtime types\n");
+ DEFTYPE("os-vm-size-t", os_vm_size_t);
+
return 0;
}