From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?utf-8?Q?Gerd_M=C3=B6llmann?= Newsgroups: gmane.emacs.devel Subject: Re: MPS: staticpro everything Date: Thu, 02 May 2024 11:04:43 +0200 Message-ID: References: <87ttjlabic.fsf@gmail.com> <87v8408wsr.fsf@gmail.com> <87o79sasl5.fsf@gmail.com> <87plu72y8h.fsf@gmail.com> <877cgfwe5g.fsf_-_@gmail.com> <871q6mptkj.fsf@gmail.com> <86frv2pse5.fsf@gnu.org> <87v83ynhuc.fsf@gmail.com> <86v83xof5w.fsf@gnu.org> <878r0thbfl.fsf@gmail.com> <86jzkdo9rm.fsf@gnu.org> <87jzkdfres.fsf@gmail.com> <86plu4mylj.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36920"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Helmut Eller , emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu May 02 11:05:40 2024 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1s2SNo-0009HJ-RL for ged-emacs-devel@m.gmane-mx.org; Thu, 02 May 2024 11:05:40 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s2SN4-0007PH-23; Thu, 02 May 2024 05:04:54 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s2SMy-0007Ot-6e for emacs-devel@gnu.org; Thu, 02 May 2024 05:04:48 -0400 Original-Received: from mail-ej1-x629.google.com ([2a00:1450:4864:20::629]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s2SMw-0000In-NY; Thu, 02 May 2024 05:04:47 -0400 Original-Received: by mail-ej1-x629.google.com with SMTP id a640c23a62f3a-a52223e004dso821595166b.2; Thu, 02 May 2024 02:04:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1714640684; x=1715245484; darn=gnu.org; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=1wFMZ7gwIu84pbJVWSzGyz4ryq1EEzsn4TNKp/WeddU=; b=Xkr+4WNB120ooWLLd9RcAlJE1CU56t7tm6vnvPocl6uvCxe3twT6dWyx86dgdmi2mb sZcvAZ3iYL2LVf/qtyRe9rWSwPOLRp45cKHDusynYYZbIbiZErQinc/DOtZO5I5cTHqR ToX1HqPDxAN+t1knApflEZTqhF8/XAs7G7wdoAcwQHF8Gy5mgXirYlb+Gu86QhUVdzdi V8KpaxV+EyoMYT24lNbOG41lH/IMoftvjwHVkHDoPTRtMSUDa19clShJ9tBbzqe0javy UOvrPNQGlJB7ljUhLiULVXhVHVNq31PtnNuNuaByxhury1rGEjC53CM44Sh05HxkReQT W4Rg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714640684; x=1715245484; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=1wFMZ7gwIu84pbJVWSzGyz4ryq1EEzsn4TNKp/WeddU=; b=BBqfniQw+QrMN4UEHIrFH5AMt6Vy6xHrVxE+6kDJxoEzvK0Aj9jDolugQnKHAdnElk an8DP2ZSGyEataqFa7l6CHFqGZnlsdDXxcNg0sifZUxHIVN/4HGyTH1U9RwoWbL/4Reo bHI9xvgnvd7L38dbGrUJiy670B/jd/ZRlRdg53qGpZb5RVZeTHz9RJeZ5RfQCeBzKraM UA5qsuq8/6Gxk7W1YOg13UmMjyV7Oy4kcV91IvqihV+XlxoruJyF16LSATpzuC9qw94a a0B4tumV/sPo5VNmCHdmb/z+EnT4wFUcoHFXV1gw8gepP2br/F5P7rKIdqcKiLNifyXB 0Mxg== X-Forwarded-Encrypted: i=1; AJvYcCU2GEdDfizxEheHA9DnXOy4u+UJGln+qmgJc/NiiIqLzF/qKa+AXMMeY52SW42rBS92k2mUiOVKXm2OotTLUVeXsZbd X-Gm-Message-State: AOJu0Yy+qRPUpef9lEzOa3tuUIYmfM8azlIw/UhnF5dOY4Ao5XpRo05F qtzgdER2bYpLtR42RlxUS8JxNrLRfWsfYsAxxg9ntKk86ewGXvtfZV15EQ== X-Google-Smtp-Source: AGHT+IEGARQ8rwgd9p1cz2Vewat2QummAb6/ede6nHxpvHVfviQxVQnk4M1tS1dGgkHxGtl5UD46xQ== X-Received: by 2002:a17:906:3b42:b0:a58:c09d:1484 with SMTP id h2-20020a1709063b4200b00a58c09d1484mr1189528ejf.7.1714640684331; Thu, 02 May 2024 02:04:44 -0700 (PDT) Original-Received: from pro2.fritz.box (p4fe3adac.dip0.t-ipconnect.de. [79.227.173.172]) by smtp.gmail.com with ESMTPSA id ko25-20020a170907987900b00a559bbe8a00sm303952ejc.100.2024.05.02.02.04.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 May 2024 02:04:43 -0700 (PDT) In-Reply-To: <86plu4mylj.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 02 May 2024 11:01:28 +0300") Received-SPF: pass client-ip=2a00:1450:4864:20::629; envelope-from=gerd.moellmann@gmail.com; helo=mail-ej1-x629.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:318546 Archived-At: Eli Zaretskii writes: > I hope the above provides a clear overview of what the cache does. Yes from me. > Given this, what would be the best way of making sure the 'struct > window' pointer in each bidi_it remains valid? The simplest idea that > comes to my mind is to arrange for the window on which redisplay works > to be unmovable. Would that solve the problem? If so, we could do > that in init_iterator, which starts the display iteration process, and > I can suggest a patch if you tell me how to do that with MPS. (I > actually think that making the window being redisplayed unmovable is a > Good Thing for other reasons, since it frees us from worrying about > passing the 'struct window' pointer around, which we do liberally.) I would propose to use igc_xzalloc_ambig + igc_free in the MPS case instead of xmalloc/xfree. There are also realloc, and palloc variants, if you use that. This is the same as the normal malloc/free, but it also adds an ambig root, so that anything references from the malloc'd memory becomes immovable / doesn't die. It's the same as if that memory would be part of the control stack.