From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Helmut Eller Newsgroups: gmane.emacs.devel Subject: Re: Finding objects on C stack - alternate GCPRO Date: Wed, 16 Nov 2011 11:18:16 +0100 Message-ID: References: <4EC38B72.1000101@yandex.ru> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1321438738 6677 80.91.229.12 (16 Nov 2011 10:18:58 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 16 Nov 2011 10:18:58 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Nov 16 11:18:55 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RQcZy-0005bm-9G for ged-emacs-devel@m.gmane.org; Wed, 16 Nov 2011 11:18:54 +0100 Original-Received: from localhost ([::1]:34218 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RQcZs-00056Q-Gd for ged-emacs-devel@m.gmane.org; Wed, 16 Nov 2011 05:18:48 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:51876) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RQcZj-0004pV-OR for emacs-devel@gnu.org; Wed, 16 Nov 2011 05:18:46 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RQcZf-0000Af-2T for emacs-devel@gnu.org; Wed, 16 Nov 2011 05:18:39 -0500 Original-Received: from lo.gmane.org ([80.91.229.12]:48975) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RQcZe-0000A8-TQ for emacs-devel@gnu.org; Wed, 16 Nov 2011 05:18:35 -0500 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1RQcZb-0005PR-PE for emacs-devel@gnu.org; Wed, 16 Nov 2011 11:18:31 +0100 Original-Received: from 212.46.171.226 ([212.46.171.226]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 16 Nov 2011 11:18:31 +0100 Original-Received: from eller.helmut by 212.46.171.226 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 16 Nov 2011 11:18:31 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 17 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: 212.46.171.226 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.91 (gnu/linux) Cancel-Lock: sha1:IDw+Xqe2J4kF/r3+P1/npniPdnA= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 80.91.229.12 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:146055 Archived-At: * Dmitry Antipov [2011-11-16 10:07] writes: > Everyone agrees that GGPROs are ugly and painful. On the other side, > current C stack marking code introduces substantial overhead by > maintaining red-black tree. And, since C stack marking is > conservative, it becomes very tricky to implement GC that may > relocate live objects (copying or compacting approach). > > But there is another method to implement GCPROs. It looks not very > portable beyond GNU C since it uses __attribute__ ((cleanup (function))) > and compound statement expressions C extensions. But it doesn't > require UNGCPRO and dumbs like 'struct gcpro gcpro1, struct gcpro2, ...'. > And I believe it should work across longjmps. And we could use C++ with destructors. Helmut