[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Issue 5732: Use unique_ptr in layout code (issue 573500043 by addres
From: |
dak |
Subject: |
Re: Issue 5732: Use unique_ptr in layout code (issue 573500043 by address@hidden) |
Date: |
Mon, 03 Feb 2020 10:27:27 -0800 |
On 2020/02/03 18:13:00, hahnjo wrote:
> On 2020/02/03 18:01:09, dak wrote:
> > Stupid question: unique_ptr has the purpose of deallocating memory
when the
> last
> > reference is gone. But we have an entire Scheme allocation system
exactly for
> > that purpose for which we are already paying the price in overhead.
Any
> chance
> > this can be usefully tracked in the SCM scheme of things?
>
> Why would we want to use GC more than needed? Any marking algorithm
will always
> be slower than a local variable going out of scope.
unique_ptr has bookkeeping overhead. The marking algorithm runs anyway
and has no memory overhead. I have not looked at the actual patch yet,
but unique_ptr really is doing pretty much the same job as SCM except
that it acts with no delay, so if it is important that the destructors
are called right away when the last reference is gone, SCM will not do
the job.
https://codereview.appspot.com/573500043/
- Issue 5732: Use unique_ptr in layout code (issue 573500043 by address@hidden), jonas . hahnfeld, 2020/02/03
- Re: Issue 5732: Use unique_ptr in layout code (issue 573500043 by address@hidden), dak, 2020/02/03
- Re: Issue 5732: Use unique_ptr in layout code (issue 573500043 by address@hidden), jonas . hahnfeld, 2020/02/03
- Re: Issue 5732: Use unique_ptr in layout code (issue 573500043 by address@hidden), nine . fierce . ballads, 2020/02/03
- Re: Issue 5732: Use unique_ptr in layout code (issue 573500043 by address@hidden),
dak <=
- Re: Issue 5732: Use unique_ptr in layout code (issue 573500043 by address@hidden), dak, 2020/02/03
- Re: Issue 5732: Use unique_ptr in layout code (issue 573500043 by address@hidden), nine . fierce . ballads, 2020/02/03
- Re: Issue 5732: Use unique_ptr in layout code (issue 573500043 by address@hidden), jonas . hahnfeld, 2020/02/03