all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* please help about garbage collector.
@ 2010-12-02  9:10 alin soare
  2010-12-02 15:46 ` Andreas Schwab
  0 siblings, 1 reply; 6+ messages in thread
From: alin soare @ 2010-12-02  9:10 UTC (permalink / raw
  To: emacs-devel


/* When scanning the C stack for live Lisp objects, Emacs keeps track
   of what memory allocated via lisp_malloc is intended for what
   purpose.  This enumeration specifies the type of memory.  */

Could you explain me what kind of Lisp Objects are keps on the stack ? What kind
of Lisp objects are kept on the stack ?

Where and why such objects are allocated ?

Thanks.


Alin.






^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: please help about garbage collector.
  2010-12-02  9:10 please help about garbage collector alin soare
@ 2010-12-02 15:46 ` Andreas Schwab
  2010-12-02 15:49   ` Alin Soare
  0 siblings, 1 reply; 6+ messages in thread
From: Andreas Schwab @ 2010-12-02 15:46 UTC (permalink / raw
  To: alin soare; +Cc: emacs-devel

alin soare <as1789@gmail.com> writes:

> Could you explain me what kind of Lisp Objects are keps on the stack ?

Anything in automatic varables that the compiler puts there.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: please help about garbage collector.
  2010-12-02 15:46 ` Andreas Schwab
@ 2010-12-02 15:49   ` Alin Soare
  2010-12-02 16:00     ` Andreas Schwab
  2010-12-02 23:15     ` Stefan Monnier
  0 siblings, 2 replies; 6+ messages in thread
From: Alin Soare @ 2010-12-02 15:49 UTC (permalink / raw
  To: Andreas Schwab; +Cc: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 248 bytes --]

> > Could you explain me what kind of Lisp Objects are keps on the stack ?
>
> Anything in automatic varables that the compiler puts there.
>

How can you detect that at a given address on the stack there is a lisp
object, and not something else ?

[-- Attachment #2: Type: text/html, Size: 448 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: please help about garbage collector.
  2010-12-02 15:49   ` Alin Soare
@ 2010-12-02 16:00     ` Andreas Schwab
  2010-12-03  7:27       ` Alin Soare
  2010-12-02 23:15     ` Stefan Monnier
  1 sibling, 1 reply; 6+ messages in thread
From: Andreas Schwab @ 2010-12-02 16:00 UTC (permalink / raw
  To: Alin Soare; +Cc: emacs-devel

Alin Soare <as1789@gmail.com> writes:

> How can you detect that at a given address on the stack there is a lisp
> object, and not something else ?

By heuristic.  Read about conservative garbage collection in your
favorite text book.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: please help about garbage collector.
  2010-12-02 15:49   ` Alin Soare
  2010-12-02 16:00     ` Andreas Schwab
@ 2010-12-02 23:15     ` Stefan Monnier
  1 sibling, 0 replies; 6+ messages in thread
From: Stefan Monnier @ 2010-12-02 23:15 UTC (permalink / raw
  To: Alin Soare; +Cc: Andreas Schwab, emacs-devel

>> > Could you explain me what kind of Lisp Objects are keps on the stack ?
>> Anything in automatic varables that the compiler puts there.
> How can you detect that at a given address on the stack there is a lisp
> object, and not something else ?

You can't, but we do it anyway.  It's called "conservative stack scanning".


        Stefan



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: please help about garbage collector.
  2010-12-02 16:00     ` Andreas Schwab
@ 2010-12-03  7:27       ` Alin Soare
  0 siblings, 0 replies; 6+ messages in thread
From: Alin Soare @ 2010-12-03  7:27 UTC (permalink / raw
  To: Andreas Schwab, Stefan Monnier; +Cc: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 287 bytes --]

> How can you detect that at a given address on the stack there is a lisp
> > object, and not something else ?
>
> By heuristic.  Read about conservative garbage collection in your
> favorite text book.
>
>
Very interesting... I did not know about this kind of algorithm.

Thanks a lot.

[-- Attachment #2: Type: text/html, Size: 590 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2010-12-03  7:27 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-02  9:10 please help about garbage collector alin soare
2010-12-02 15:46 ` Andreas Schwab
2010-12-02 15:49   ` Alin Soare
2010-12-02 16:00     ` Andreas Schwab
2010-12-03  7:27       ` Alin Soare
2010-12-02 23:15     ` Stefan Monnier

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.