From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Andreas Politz Newsgroups: gmane.emacs.devel Subject: Re: Overlays as an AA-tree Date: Thu, 09 Feb 2017 11:19:21 +0100 Message-ID: <8760kjacpi.fsf@hochschule-trier.de> References: <87d1jylv43.fsf@fastmail.com> <87fujv64mn.fsf@hochschule-trier.de> <87fujvpkzc.fsf@fastmail.com> <87vasr5tqd.fsf@hochschule-trier.de> <87d1ex4kon.fsf@hochschule-trier.de> <87d1evod6x.fsf@fastmail.com> <877f53ftab.fsf@hochschule-trier.de> <878tpiqiuc.fsf@hochschule-trier.de> <87shnppspb.fsf@hochschule-trier.de> <87o9yc9v30.fsf@hochschule-trier.de> <87a89vaes3.fsf@hochschule-trier.de> <87efz7n0g5.fsf@fastmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1486635625 22238 195.159.176.226 (9 Feb 2017 10:20:25 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 9 Feb 2017 10:20:25 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) Cc: Stefan Monnier , emacs-devel@gnu.org To: Joakim Jalap Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Feb 09 11:20:21 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cblpt-0005Wc-6I for ged-emacs-devel@m.gmane.org; Thu, 09 Feb 2017 11:20:21 +0100 Original-Received: from localhost ([::1]:36791 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cblpy-0006eY-HL for ged-emacs-devel@m.gmane.org; Thu, 09 Feb 2017 05:20:26 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52295) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cblpF-0006eD-5l for emacs-devel@gnu.org; Thu, 09 Feb 2017 05:19:42 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cblpB-0007ME-36 for emacs-devel@gnu.org; Thu, 09 Feb 2017 05:19:41 -0500 Original-Received: from gateway-a.fh-trier.de ([143.93.54.181]:48280) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cblpA-0007IX-O2 for emacs-devel@gnu.org; Thu, 09 Feb 2017 05:19:37 -0500 X-Virus-Scanned: by Amavisd-new + McAfee uvscan + ClamAV [Rechenzentrum Hochschule Trier (RZ/HT)] Original-Received: from localhost (ip5f5bdee7.dynamic.kabel-deutschland.de [95.91.222.231]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: politza) by gateway-a.fh-trier.de (Postfix) with ESMTPSA id 4B20D179A57C; Thu, 9 Feb 2017 11:19:22 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha1; c=simple/simple; d=hochschule-trier.de; s=default; t=1486635562; bh=lyNiZplzXWYWBOBjUZM7yUwCjsI=; h=From:To:Cc:Subject:References:Date:In-Reply-To:Message-ID: MIME-Version:Content-Type; b=doswqD+TXVU5M31Hagh4oiic5O2mDQYNJy1R8tJns2uYSs/8TSvCbLCWRdDWGvXy/ gEk9BAd44fVZIAqkPBIuBgYL3GWTlJYW5aMqnODcPJK9guRs2Z2SI+jABK+LN4kGYK m29/4CsBfo70cOzikplJ0s4UZs7b5MICeNOjEq/g= In-Reply-To: <87efz7n0g5.fsf@fastmail.com> (Joakim Jalap's message of "Thu, 09 Feb 2017 11:05:46 +0100") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x [fuzzy] X-Received-From: 143.93.54.181 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.devel:212160 Archived-At: Joakim Jalap writes: > Andreas Politz writes: > >> [...] So, is it save to call xmalloc at this point ? >> > I think it should be. I used xmalloc all the time in my branch :) Isn't > the idea to gather the interval_nodes which begin at the point of insertion, > adjust them outside the tree and then reinsert them? Then you can free > the memory right after, no? Yes and I guess so. > Why do you need to allocate memory to traverse the tree? Isn't the tree, > already there? I have a iterator interface, so I need to keep the stack around. -ap