guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

gc calles mark for garbage smobs


From: romph
Subject: gc calles mark for garbage smobs
Date: Mon, 24 Apr 2017 12:39:40 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0

Hey,

I found somehow confusing functionality of garbage collector,
which I really can't understand.
It seems to me, that gc calls the mark functions for garbage objects
before they are than correctly removed from memory.
Is it the a wanted action or some kind of side effect?

Roman

[init] child_tag = 0x1677
[init] container_tag = 0x1777
version = 2.2.0.18-d7778
(
[let begin] ----------------------------------------
[make_container] ptr=0x9b345fe0 (0x1777,0x9b296480)
[make_container] ptr=0x9b345fc0 (0x1777,0x9b296440)
[make_child] ptr=0x9b345fa0 (0x1677,0x4)
[make_child] ptr=0x9b345f80 (0x1677,0x4)
ch1 = #<child 0x9b345fa0>
ch2 = #<child 0x9b345f80>
c1 = #<container my.container.1 child=0x9b345fa0>
c2 = #<container my.container.2 child=0x9b345f80>
[mark_child] ptr=0x9b345f80 (0x1677,0x4)
[mark_child] ptr=0x9b345fa0 (0x1677,0x4)
[mark_container] ptr=0x9b345fc0 (0x1777,0x9b296440)
[mark_container] ptr=0x9b345fe0 (0x1777,0x9b296480)
[let end] ------------------------------------------
)

+----------------------------------------------------+
|  What are the following mark functions called for? |
+----------------------------------------------------+
[mark_child] ptr=0x9b345f80 (0x1677,0x4)
[mark_child] ptr=0x9b345fa0 (0x1677,0x4)
[mark_container] ptr=0x9b345fc0 (0x1777,0x9b296440)
[mark_container] ptr=0x9b345fe0 (0x1777,0x9b296480)
[free_child] ptr=0x9b345f80 (0x0077,0x4)
[free_child] ptr=0x9b345fa0 (0x0077,0x4)
[free_container] ptr=0x9b345fc0 (0x0077,0x9b296440)
[free_container] ptr=0x9b345fe0 (0x0077,0x9b296480)


Attachment: child.c
Description: Text Data

Attachment: child.h
Description: Text Data

Attachment: container.c
Description: Text Data

Attachment: container.h
Description: Text Data

Attachment: main.c
Description: Text Data

Attachment: Makefile
Description: Text document

Attachment: test.scm
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]