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: bignums Date: Tue, 07 May 2024 09:21:50 +0200 Message-ID: References: <87bk5j12dc.fsf@gmail.com> <87jzk6ytzo.fsf_-_@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32968"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Emacs Devel , Eli Zaretskii To: Helmut Eller Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue May 07 09:22:45 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 1s4F9x-0008Np-Ah for ged-emacs-devel@m.gmane-mx.org; Tue, 07 May 2024 09:22:45 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s4F9M-0001qr-OP; Tue, 07 May 2024 03:22:08 -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 1s4F9B-0001eH-AZ for emacs-devel@gnu.org; Tue, 07 May 2024 03:22:03 -0400 Original-Received: from mail-ej1-x634.google.com ([2a00:1450:4864:20::634]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s4F98-0007vd-6m; Tue, 07 May 2024 03:21:57 -0400 Original-Received: by mail-ej1-x634.google.com with SMTP id a640c23a62f3a-a59a0168c75so703266466b.1; Tue, 07 May 2024 00:21:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1715066512; x=1715671312; 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=hBjPlzDUF4yAKtl3ZQtje3Q+umYRC9azIpobOwVhNgA=; b=M13PLREBjTMskBePXRwyjHaqqn09CknyKiZ97w1SMEqK12HNlDKyoOxWJrxRRv7t0q 2yZGhOxCppGSydB4d9gG87Dz8fHKun9Dk01W87gLeq4qs3uEcy4MjYEVn4w4uqKym+xn KwLYqcJoxuzs2GUi5dRo3DjMvRRCA0DQXUKPoh+r0ZkdB9/TCbsOwPIYx2+KdXLzIPur LS324+h8GEYlrBq7LOGC7u+9fHI6oILr5QGrh74Wny+5RtALkBk+S/4skvipOsMxIUhW AiWYMmZudEHFza5qMs1H5IyQY67dDSIDjiIzfimNtyjl7ENxGZJsqErVUtYk2KeRxJHW mf9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715066512; x=1715671312; 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=hBjPlzDUF4yAKtl3ZQtje3Q+umYRC9azIpobOwVhNgA=; b=bDiR4AgNvnEezqe7pl1xGJptdM7EffK/gGy57isv45I4DVsiU2naFmnsKDVI92sW1M Cep7Wk+JUUZDzHX+jfghhDXtpDEv3XjucTJs2UQ15Nt+UGte/vvruNBfU30bi4a3W59k l8PyOxzj6Z3UsCWCXcIqJNRlxFZ2GoZ6TJZVM73RJ4HKuf4f86uI63TdHSxcNXRt4Q7y Pagwg8tPzsf6GzSX0RMnnLtZPzV7eo66N7ybF/4AMOSrdSCpDLN8840xhuEON6a/+PoG oBQiOftRCwza9e9S0FURsPdWO/nZL+JMTs65hKVzBOAn4oS94ABiBdHTVKHvDL3o6OHx reWg== X-Forwarded-Encrypted: i=1; AJvYcCW3wZO5TftalN8HhJht3VdgSE5uwORYt304lZyCYSslN/2A0lnOqLn7Doq0Stw2TXr0PUcMAU/1giiD8fI= X-Gm-Message-State: AOJu0Yy4IDU0G4uwZfYsJkSbOwDHm2qRh3yjgqbWNb8Ep1CC+8Twjp8m LgH1l/kqZuJsK0NH1heM35JlLSpoOCacGBG/H+cG7RRVikf6asTf0c9WiQ== X-Google-Smtp-Source: AGHT+IF/dvIfS3ftSYZpl8IrneruvakOVS+hkSd1FcZxUv5br4gBPzfY6xu0NE5GIIbE19x/hrQywQ== X-Received: by 2002:a17:907:94c1:b0:a59:cb29:3fb5 with SMTP id dn1-20020a17090794c100b00a59cb293fb5mr3887740ejc.20.1715066511814; Tue, 07 May 2024 00:21:51 -0700 (PDT) Original-Received: from pro2.fritz.box (pd9e36718.dip0.t-ipconnect.de. [217.227.103.24]) by smtp.gmail.com with ESMTPSA id f15-20020a170906560f00b00a599ec633cfsm4491355ejq.104.2024.05.07.00.21.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 May 2024 00:21:51 -0700 (PDT) In-Reply-To: <87jzk6ytzo.fsf_-_@gmail.com> (Helmut Eller's message of "Tue, 07 May 2024 09:13:47 +0200") Received-SPF: pass client-ip=2a00:1450:4864:20::634; envelope-from=gerd.moellmann@gmail.com; helo=mail-ej1-x634.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:318924 Archived-At: Helmut Eller writes: > On Mon, May 06 2024, Helmut Eller wrote: > >> I had to disable the pidigits program because the MPS version ate all >> memory and began to swap. There's probably something wrong with >> bignums. > > It seems that bignums aren't freed because that would need finalization. > But as long as Emacs is busy executing the benchmark program, it doesn't > process finalization messages. > > We could create a separate finalization thread that processes these > messages. For bignums this thread could call mpz_clear, which I suppose > is thread safe. Things aren't so easy for the case where we need to > call a Lisp function. We could create a timer that calls this function. > > WDYT? Could we perhaps use the fact that this works in the old GC somehow? I mean, we know that clear_vector does that in the old GC (or so I think). And that is called from garbage_collect often enough. What if we handled MPS messages there, and not only when Emacs is idle?