Steel Bank Common Lisp

ROOM dynamic space usage wrong

Reported by Robert Brown on 2011-10-25
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SBCL
Medium
Unassigned

Bug Description

ROOM reports the wrong value for dynamic space usage on 64-bit platforms
when the size of the heap is large. Example is below. I've attached a patch
that fixes the problem.

bob

==========
SBCL 1.0.52
Linux paradicsom.nyc.corp.google.com 2.6.38.8-gg621 #2 SMP Wed Sep 14 13:43:05 PDT 2011 x86_64 GNU/Linux
(:ASDF2 :ASDF :ASDF-UNIX :SB-XREF-FOR-INTERNAL :ANSI-CL :COMMON-LISP :SBCL
 :SB-DOC :SB-TEST :SB-LDB :SB-PACKAGE-LOCKS :SB-UNICODE :SB-EVAL
 :SB-SOURCE-LOCATIONS :IEEE-FLOATING-POINT :X86-64 :UNIX :ELF :LINUX :SB-THREAD
 :LARGEFILE :GENCGC :STACK-GROWS-DOWNWARD-NOT-UPWARD :C-STACK-IS-CONTROL-STACK
 :LINKAGE-TABLE :COMPARE-AND-SWAP-VOPS :UNWIND-TO-FRAME-AND-CALL-VOP
 :RAW-INSTANCE-INIT-VOPS :STACK-ALLOCATABLE-CLOSURES :STACK-ALLOCATABLE-VECTORS
 :STACK-ALLOCATABLE-LISTS :STACK-ALLOCATABLE-FIXED-OBJECTS :ALIEN-CALLBACKS
 :CYCLE-COUNTER :COMPLEX-FLOAT-VOPS :FLOAT-EQL-VOPS :INLINE-CONSTANTS
 :MEMORY-BARRIER-VOPS :MULTIPLY-HIGH-VOPS :OS-PROVIDES-DLOPEN
 :OS-PROVIDES-DLADDR :OS-PROVIDES-PUTWC :OS-PROVIDES-SUSECONDS-T
 :OS-PROVIDES-GETPROTOBY-R :OS-PROVIDES-POLL)
==========

BOB> (defvar *foo* (make-array 10000000000 :element-type '(unsigned-byte 8)))
*FOO*
BOB> (room)
Dynamic space usage is: 1,474,253,424 bytes. <--- WRONG VALUE
Read-only space usage is: 6,352 bytes.
Static space usage is: 4,064 bytes.
Control stack usage is: 9,392 bytes.
Binding stack usage is: 1,040 bytes.
Control and binding stack usage is for the current thread only.
Garbage collection is currently enabled.

Breakdown for dynamic space:
  10,000,316,512 bytes for 3,266 simple-array-unsigned-byte-8 objects.
  63,904,272 bytes for 1,142,287 other objects.
  10,064,220,784 bytes for 1,145,553 dynamic objects (space total.)

Robert Brown (robert-brown) wrote :
Changed in sbcl:
assignee: nobody → Nikodemus Siivola (nikodemus)
status: New → Triaged
importance: Undecided → Medium
Nikodemus Siivola (nikodemus) wrote :

commit 408ed62925d643c163f0e9fc7b3fd41cce65fbea
Author: Robert Brown <email address hidden>
Date: Sun Oct 30 13:44:33 2011 +0200

    fix GENCGC DYNAMIC-USAGE on 64-bit platforms

      Fixes lp#881445.

Changed in sbcl:
assignee: Nikodemus Siivola (nikodemus) → nobody
status: Triaged → 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

Patches