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 16:01:42 +0200 Message-ID: References: <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> <86msp8lbci.fsf@gnu.org> <86ikzwl8ih.fsf@gnu.org> <87r0ektkfo.fsf@yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19886"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Eli Zaretskii , eller.helmut@gmail.com, emacs-devel@gnu.org To: Po Lu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu May 02 16:02:35 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 1s2X19-0004z4-33 for ged-emacs-devel@m.gmane-mx.org; Thu, 02 May 2024 16:02:35 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s2X0Y-0004z2-CS; Thu, 02 May 2024 10:01:58 -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 1s2X0W-0004yZ-9y for emacs-devel@gnu.org; Thu, 02 May 2024 10:01:56 -0400 Original-Received: from mail-ej1-x633.google.com ([2a00:1450:4864:20::633]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s2X0O-0004Lo-8R; Thu, 02 May 2024 10:01:51 -0400 Original-Received: by mail-ej1-x633.google.com with SMTP id a640c23a62f3a-a58fbbcd77aso610992766b.2; Thu, 02 May 2024 07:01:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1714658504; x=1715263304; darn=gnu.org; h=content-transfer-encoding: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=FZEU4j6KHTmHpuv0907cMbQypK9JVmx39csTeg2bFYM=; b=HpNyHzY962xLQ3zhqjCEiTiFRSmrxDpgyuL3RfzWT2g5IWmJQiEFTCm+odCo4VFh87 +fZC5ie8UdZvwGaYfIqnlpxqpCv0RvlnxnX81+l5DX6ewHClswLhARkcMsZ8OIHnh8ma Uz61q7hGEmPGcnF99n6iGz6j904oIoSbKlbKFpgB4GUiPHUZ7Am8Fepmr5xqhhw4PIub kKa4zNMF9Y9jQzGJSArhlab+KkrGvqp4v5msJJcEvZ3ujTe8u1tvuvEDJSs7xDcTbE7Q NmUUI+Ey+vfbcQUL/RSlphTFLV4oIcuSSPp9mo1JFWdCspVYSoq4MYcAddhU918ujYP5 kCDg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714658504; x=1715263304; h=content-transfer-encoding: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=FZEU4j6KHTmHpuv0907cMbQypK9JVmx39csTeg2bFYM=; b=oo3ivG1Frl5+hu+Carw1OhBQeD6pJnXxh1yfva+XTswmnJgIch7AnKkvEjrIIOJ18F fU60L5nefDvP27m4xO7BnZO6ApoFEhFmb6jEzGyascZ0FWxhld7Dhz6FKJFojBZbmwfX B+hApQ+cItS46JRcc1KZ1G0zVTumAp9KiLejkXOuXxWqUDGWKwx1EimBQYDzDr4k531Y Vltyh+bwzfMAg5F75T/iLojBAMihNaKgWDlJ3C0rBJqaO15IGDh0gM+ZafNiGoLHhwtd hZYP8Pq+k0yzhH+aDx1dpcNZYM4v9HHKNfImUHBJGADmHixejECuWexOOg4Slvbmtt2M Wkow== X-Forwarded-Encrypted: i=1; AJvYcCUEQIXxmsy8iWsbI8ZO81+dfs+olI9Wot7LVsDQMeTiOpKCq2Eup3ARzh+nZpzyMO4yQGG2FLaTeVpJSmuJ/iGucAYW X-Gm-Message-State: AOJu0YxLCCtryfcI8KaXAdcgc4p0leXkE/aL9F6QE9YgPM9MEC16ys7E Q2E+klh5oBO5RzKjGKVktn7jY8S6r6hj5J6nRcb/8aqXm6EHS0M0qx/zog== X-Google-Smtp-Source: AGHT+IFEYPyZlIffPmJVm3up/XNECGZiGI9al8YCO+t+WQIwE4uGe0CoL/6VCJTBV45ngGcggIjJwA== X-Received: by 2002:a50:f696:0:b0:56e:2ebc:5c4 with SMTP id d22-20020a50f696000000b0056e2ebc05c4mr4068463edn.20.1714658504355; Thu, 02 May 2024 07:01: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 e15-20020a056402088f00b0057232df2e5dsm566544edy.32.2024.05.02.07.01.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 May 2024 07:01:43 -0700 (PDT) In-Reply-To: <87r0ektkfo.fsf@yahoo.com> (Po Lu's message of "Thu, 02 May 2024 21:25:31 +0800") Received-SPF: pass client-ip=2a00:1450:4864:20::633; envelope-from=gerd.moellmann@gmail.com; helo=mail-ej1-x633.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:318577 Archived-At: Po Lu writes: > Gerd M=C3=B6llmann writes: > >> I now wonder: If struct it always lives on the stack (I think that's sti= ll >> true?), then it->w is also on the stack, and thus it->w is immovable by >> fact fact. Right? > > You'll excuse me if I'm late to the party, but what becomes of strings > in cached bidi_its when MPS is in control? bidi_cache is a global variable pointing to a malloc'd array of bidi_it. So, by itself, nothing is protected. MPS doesn't know anything about malloc'd memory. For some reason, this works with the old GC, without the need for a special mark function, analogous to mark_specpdl, say. Why that is I have no idea. Something else apparently keeps everything in the cache alive. (As I mentioned, using igc_xzalloc_ambig would do the trick. With the disadvantages Eli mentioned - scanning more than needed.)