From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id B1752382C14A for ; Wed, 26 Oct 2022 21:15:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org B1752382C14A Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1666818957; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=is1FBlHBEB5pAOFLa8n2f2FTiJAki/DH8Dy549pB56k=; b=OmwwQ16jHsMTY0B1m2jmxN4qjIyX6QULr3B7FxfVSyENP77u5iu+CDkyfJJpnRUeeWDqxZ Of/8IzdxOJieDy/tgCcfzBy7bNyN6PZFkplP0uO5n2mGqDeiHWRpBwg1t4N/sSB+SWiI3v 1SFd+wPiTHWlh7T1pWWH1OZwjypJI+Y= Received: from mail-qv1-f70.google.com (mail-qv1-f70.google.com [209.85.219.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-526-marnQTc1MpGiTZNXZX3K1w-1; Wed, 26 Oct 2022 17:15:55 -0400 X-MC-Unique: marnQTc1MpGiTZNXZX3K1w-1 Received: by mail-qv1-f70.google.com with SMTP id x2-20020a0cff22000000b004bb07bf7557so9014135qvt.11 for ; Wed, 26 Oct 2022 14:15:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=is1FBlHBEB5pAOFLa8n2f2FTiJAki/DH8Dy549pB56k=; b=kfIvsdFQsAIQp3gNon5DaqZRW+khFXzyjGNdmPGWGOTGhgc2qPe6LkjX/VHOY/SHWn L1yXm8rRUbvLdKmCPCfWVQdHhB3DDgpmLWLb9mr2Fj4IKMX8jdSzC4wfgy/oEA/ydUfw /KSC52EfF/6D8JaO6IKY9xoGVx7tk7Xg5POYi2ODtQrZov92eL54flT++PJRPphRoT8V 35lVRuJMyimx6rEO9NAciZNwkDfJThLhV9GofyAHlIY/AFcpIwcNm9HRLCmrNHtmjaLU /aaLFyFjXT+2pKIGdU+9U+3v07H4fbirhbXSco1HbDNRZpltdaf9tzBkLAhfVZ+jNc7j jc5g== X-Gm-Message-State: ACrzQf0tWfumFRRcSWD9+EPnKNPrpc/ANNMwcIzrwLRu65lDVfXvRjva cWhvqCbQ4nNQi8gMaTAHBQyZQHRLjgHR0WTECGwLxCZ8RqSh5/xjSPWpx80s/DxY0CqDZj4ra2P uU1/6rrYtV75xZA== X-Received: by 2002:a0c:a9cf:0:b0:4bb:84ae:5eed with SMTP id c15-20020a0ca9cf000000b004bb84ae5eedmr11517962qvb.62.1666818955314; Wed, 26 Oct 2022 14:15:55 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7tPgttIUfyZ32b+mnLUNuQzCWgyPXIb1/LXmCP1W71vGnjuGw4LBY2052ZGoRHM2dAVpyBOw== X-Received: by 2002:a0c:a9cf:0:b0:4bb:84ae:5eed with SMTP id c15-20020a0ca9cf000000b004bb84ae5eedmr11517941qvb.62.1666818955092; Wed, 26 Oct 2022 14:15:55 -0700 (PDT) Received: from t14s.localdomain (c-73-69-212-193.hsd1.nh.comcast.net. [73.69.212.193]) by smtp.gmail.com with ESMTPSA id h10-20020a05620a400a00b006f8665f483fsm2917492qko.85.2022.10.26.14.15.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Oct 2022 14:15:54 -0700 (PDT) Message-ID: Subject: Re: Rust frontend patches v3 From: David Malcolm To: arthur.cohen@embecosm.com, gcc-patches@gcc.gnu.org Cc: gcc-rust@gcc.gnu.org Date: Wed, 26 Oct 2022 17:15:53 -0400 In-Reply-To: <20221026081811.602573-1-arthur.cohen@embecosm.com> References: <20221026081811.602573-1-arthur.cohen@embecosm.com> User-Agent: Evolution 3.44.4 (3.44.4-1.fc36) MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-5.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,KAM_NUMSUBJECT,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Wed, 2022-10-26 at 10:17 +0200, arthur.cohen@embecosm.com wrote: > This is the fixed version of our previous patch set for gccrs - We've > adressed > the comments raised in our previous emails. [...snip...] (Caveat: I'm not a global reviewer) Sorry if this is answered in the docs in the patch kit, but a high- level question: what's the interaction between gccrs and gcc's garbage collector? Are the only GC-managed objects (such as trees) either (a) created near the end of the gccrs, or (b) common globals created at initialization and with GTY roots? Are there any points where a collection happen within gccrs? Or is almost everything stored using gccrs's own data structures, and are these managed in the regular (non- GC) heap? I skimmed the patches and see that gccrs uses e.g. std::vector, std::unique_ptr, std::map, and std::string; this seems reasonable to me, but it got me thinking about memory management strategies. I see various std::map e.g. in Rust::Compile::Context; so e.g. is the GC guaranteed never to collect whilst this is live? Hope this is constructive Dave