Hello,

Can you explain this:

In pure SBCL (or )lisp-ed in FriCAS):

└─$ rlwrap sbcl
This is SBCL 2.3.7.debian, an implementation of ANSI Common Lisp.
More information about SBCL is available at <http://www.sbcl.org/>.

SBCL is free software, provided as is, with absolutely no warranty.
It is mostly in the public domain; some portions are provided under
BSD-style licenses.  See the CREDITS and COPYING files in the
distribution for more information.
* (room)
Dynamic space usage is:   19,979,488 bytes.  <================
Immobile space usage is:  13,119,488 bytes (17,856 bytes overhead).
Read-only space usage is:  6,779,504 bytes.
Static space usage is:         3,424 bytes.
Control stack usage is:        2,112 bytes.
Binding stack usage is:          640 bytes.
Control and binding stack usage is for the current thread only.
Garbage collection is currently enabled.

Breakdown for dynamic space:
   7,083,984 bytes for 109,124 instance objects
   6,602,400 bytes for  41,811 simple-vector objects
   4,146,960 bytes for 259,185 cons objects
   1,289,168 bytes for  16,210 simple-array-unsigned-byte-8 objects
     851,536 bytes for  18,598 other objects

  19,974,048 bytes for 444,928 dynamic objects (space total)

[snip]

; ===========
* (progn (make-array '(5000 5000) :element-type 'double-float) nil)
NIL
; ===========

* (room)
Dynamic space usage is:   220,010,160 bytes. <==============
Immobile space usage is:   13,119,488 bytes (17,856 bytes overhead).
Read-only space usage is:   6,779,504 bytes.
Static space usage is:          3,424 bytes.
Control stack usage is:         2,112 bytes.
Binding stack usage is:           640 bytes.
Control and binding stack usage is for the current thread only.
Garbage collection is currently enabled.

Breakdown for dynamic space:
  200,000,016 bytes for       1 simple-array-double-float object  <========
   19,968,896 bytes for 444,855 other objects

  219,968,912 bytes for 444,856 dynamic objects (space total)

[snip]

; ===============================
* (sb-ext:gc :full t)
NIL
; ===============================

* (room)
Dynamic space usage is:   19,992,864 bytes.  <=============
Immobile space usage is:  13,119,488 bytes (17,856 bytes overhead).
Read-only space usage is:  6,779,504 bytes.
Static space usage is:         3,424 bytes.
Control stack usage is:        2,112 bytes.
Binding stack usage is:          640 bytes.
Control and binding stack usage is for the current thread only.
Garbage collection is currently enabled.

Breakdown for dynamic space:
   7,082,784 bytes for 109,104 instance objects
   6,585,632 bytes for  41,804 simple-vector objects
   4,146,784 bytes for 259,174 cons objects
   1,289,168 bytes for  16,210 simple-array-unsigned-byte-8 objects
     848,000 bytes for  18,529 other objects

  19,952,368 bytes for 444,821 dynamic objects (space total)

[snip]

But in the FriCAS interpreter full manual garbage collection doesn't
seem to work:

              Version: FriCAS 1.3.10-dev built with SBCL 2.4.0
                 Timestamp: lun. 01 janv. 2024 15:57:35 CET
-----------------------------------------------------------------------------
   Issue )copyright to view copyright notices.
   Issue )summary for a summary of useful system commands.
   Issue )quit to leave FriCAS and return to shell.
-----------------------------------------------------------------------------

(1) -> )lisp (room)

Dynamic space usage is:   41,776,368 bytes.  <===========
Immobile space usage is:  24,498,176 bytes (23,440 bytes overhead).
Read-only space usage is: 12,701,888 bytes.
Static space usage is:         4,464 bytes.
Control stack usage is:        1,984 bytes.
Binding stack usage is:          368 bytes.
Control and binding stack usage is for the current thread only.
Garbage collection is currently enabled.

Breakdown for dynamic space:
  12,409,920 bytes for 198,346 instance objects
  11,857,552 bytes for  75,593 simple-vector objects
   9,962,192 bytes for 622,637 cons objects
   7,538,176 bytes for 100,409 other objects

  41,767,840 bytes for 996,985 dynamic objects (space total)

[snip]

; =================================
(1) -> a:=qnew(5000,5000)$Matrix(DoubleFloat);

                                                    Type: Matrix(DoubleFloat)
; =================================

(2) -> )lisp (room)

Dynamic space usage is:   241,668,128 bytes. <============
Immobile space usage is:   24,572,528 bytes (27,120 bytes overhead).
Read-only space usage is:  12,701,888 bytes.
Static space usage is:          4,464 bytes.
Control stack usage is:         1,984 bytes.
Binding stack usage is:           368 bytes.
Control and binding stack usage is for the current thread only.
Garbage collection is currently enabled.

Breakdown for dynamic space:
  212,269,600 bytes for  75,893 simple-vector objects  <=============
   12,444,736 bytes for 199,037 instance objects
   16,711,312 bytes for 709,352 other objects

  241,425,648 bytes for 984,282 dynamic objects (space total)

[snip]

; ==============================================
(2) -> )cl all
   All user variables and function definitions have been cleared.
(1) -> )boot $InteractiveFrame

|$InteractiveFrame|
Value = ((NIL))
(1) -> )lisp (sb-ext:gc :full t)

Value = NIL
; ===============================================

(1) -> )lisp (room)

Dynamic space usage is:   241,503,344 bytes.  <=================
Immobile space usage is:   24,572,528 bytes (27,120 bytes overhead).
Read-only space usage is:  12,701,888 bytes.
Static space usage is:          4,464 bytes.
Control stack usage is:         1,984 bytes.
Binding stack usage is:           368 bytes.
Control and binding stack usage is for the current thread only.
Garbage collection is currently enabled.

Breakdown for dynamic space:
  212,252,784 bytes for  75,885 simple-vector objects  <===========
   12,444,416 bytes for 199,039 instance objects
   16,707,408 bytes for 709,070 other objects

  241,404,608 bytes for 983,994 dynamic objects (space total)

[snip]

(1) ->

It is trange in my opinion. And here the breakdown is not explicit
because FriCAS uses a lot of simple vector objects. If I create for
example 3 simple-vector-double-float objects, the 3 vectors are
displayed with their memory consumption separately from other object
types and the Breakdown for dynamic space explicitly displays them.

Any idea what happens here and if this is what is expected?

Regards,

- Greg

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to fricas-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/fricas-devel/CAHnU2dZGnSzWsSGDoEmOobqG2SSkGY5BaWgkZMzHFaGCvczw9g%40mail.gmail.com.

Reply via email to