bytes-consed-between-gcs is locked to 32-bit regardless of machine word size

Bug #870868 reported by David Holz on 2011-10-08
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

On a 64-bit system, setting bytes-consed-between-gcs to 9GB results in a nursery memory usage pattern with a 1GB range.

The setter & reader for bytes-consed-between-gcs in gc.lisp uses (sb!alien:unsigned 32), while the C code is an unsigned long. This prevents 64-bit systems from using >4GB nursery size, which is sometimes desirable. It seems to silently mask the 64-bit number to 32-bit without any warnings or other bugs.

Changing the accessors to use sb!alien:unsigned-long seemed to fix it on our end. The current git browser on SF shows unsigned 32's.

Changed in sbcl:
assignee: nobody → Nikodemus Siivola (nikodemus)
importance: Undecided → Low
status: New → Triaged
Changed in sbcl:
status: Triaged → In Progress
Nikodemus Siivola (nikodemus) wrote :

Can't use unsigned-long as apparently that's 32 bits on win64. Feh.

commit 3cd198ea8fb1635057038934730624e68b5da012
Author: Nikodemus Siivola <email address hidden>
Date: Sat Nov 19 14:16:47 2011 +0200

    unsigned long -> os_vm_size_t refactoring

     Replace a number of GC related unsigned longs with os_vm_size_t, make it
     available in on the lisp-side as well, and use where appropriate.

     Makes BYTES-CONSED-BETWEEN-GCS and its SETF-version also support large

Changed in sbcl:
assignee: Nikodemus Siivola (nikodemus) → nobody
status: In Progress → Fix Committed
Changed in sbcl:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers