220 33606 <om3ev4$hgg$1@blaine.gmane.org> article
Path: news.gmane.org!.POSTED!not-for-mail
From: Phil Bouchard <philippeb8@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Deterministic C++ memory manager
Date: Fri, 4 Aug 2017 23:44:43 -0400
Lines: 94
Approved: news@gmane.org
Message-ID: <om3ev4$hgg$1@blaine.gmane.org>
References: <68af3311-d2d7-42ff-8cfd-f8bcdc20bf0c@isocpp.org>
 <da483e72-1a63-4ea1-80c4-8d63aa018db9@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: text/plain; charset="UTF-8"; format=flowed
Content-Transfer-Encoding: quoted-printable
X-Trace: blaine.gmane.org 1501950167 11954 195.159.176.226 (5 Aug 2017 16:22:47 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Sat, 5 Aug 2017 16:22:47 +0000 (UTC)
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101
 Thunderbird/52.2.1
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBCAYTFXFZMBBBVXBS7GAKGQEDOW4SUY@isocpp.org Sat Aug 05 18:22:42 2017
Return-path: <std-proposals+bncBCAYTFXFZMBBBVXBS7GAKGQEDOW4SUY@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-yw0-f200.google.com ([209.85.161.200])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBCAYTFXFZMBBBVXBS7GAKGQEDOW4SUY@isocpp.org>)
	id 1de1qc-0002mz-AX
	for gclcip-std-proposals@m.gmane.org; Sat, 05 Aug 2017 18:22:42 +0200
Original-Received: by mail-yw0-f200.google.com with SMTP id n140sf79166100ywd.13
        for <gclcip-std-proposals@m.gmane.org>; Sat, 05 Aug 2017 09:22:48 -0700 (PDT)
ARC-Seal: i=2; a=rsa-sha256; t=1501950168; cv=pass;
        d=google.com; s=arc-20160816;
        b=TJkHP93bZLYJKmN9lbJJW6QjnaKubKvyF6gj3/KPkruWSz0bDMga0BGHzZIvGrM3pY
         nztcOx5QoQS0naxIcICtxlpADJGjCnlT35t220tly7RzBYdF+HzZqMFucOJJSy3XX8G9
         VM1/zFIphbSs3skhNuwRGEUQdrumH7NF4TNj1OcBa97J2BesLo9F5v+PxiuyWG1XS01W
         bs/pn1WyjNtjVAdp5BjrGPG6vHZGu3g9Vz3BZBnNaPLI/E5a3M/4GBvTIk7LK1Z0tkEw
         mhli6kQHv42BFY6y7XDYGqjXueom4/eza/7/f3e6T41ltniUquW9EehRLQrOKTiqKYP6
         lUvA==
ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post
         :list-id:mailing-list:precedence:reply-to:content-language
         :in-reply-to:user-agent:content-transfer-encoding:mime-version
         :references:message-id:lines:date:subject:from:to
         :arc-authentication-results:arc-message-signature:dkim-signature
         :arc-authentication-results;
        bh=Q1om9gpedOzaS+WH3mOH+mX3EfBLcnKKZHePRILpiOQ=;
        b=Gd8Yy7VZ98pNNirVHDDma9rqrY6q2fw5nLutkU8IyjrJaH8SK1nRk8fZF1fClqLAIA
         rKRG5KGp7FOL4GFLH0eNMT6ccJBlIKOdisYE/l+KvkNmDqyqgn0L3/mPceXwD3dxL0/e
         +dVIlGeMbcPj/xrQjsuFfvG+1s+ROz1Biu5soPQ3ccqHivYQDYTOS9KufF3NQUIv2Luw
         v9E3YGWy08x7YtDtOJrntg/hNYcquI3lZdgLIYWAajdUh/KdtjKOXfbt9ZDMotl+YsU8
         GCTD9R+sPqJxQpszBr4LU/Xr8/P5j1cUehGZPMDNov1Hgt 
ARC-Authentication-Results: i=2; mx.google.com;
       spf=neutral (google.com: 195.159.176.226 is neither permitted nor denied by best guess record for domain of gclcip-std-proposals@m.gmane.org) smtp.mailfrom=gclcip-std-proposals@m.gmane.org;
       dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmail.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=to:from:subject:date:lines:message-id:references:mime-version
         :content-transfer-encoding:user-agent:in-reply-to:content-language
         :x-original-sender:x-original-authentication-results:reply-to
         :precedence:mailing-list:list-id:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=Q1om9gpedOzaS+WH3mOH+mX3EfBLcnKKZHePRILpiOQ=;
        b=I2XEMIPMebaCy7CtBC9p9Ljn6vhyRRxHwYLe1Iaw/uzoaD+iZ7F3aBeMIxSYDbJcbV
         UaAZjnDDOXcgLHRPuVM+rZvp/X0NRbsFAFjwl00RByCllLgjY7qg8/XMeUIYlyt3ZvxE
         tiIoPMXFEcXIAEfAyM4zXcg0xGN1UZQdGzenAeobJtJ0WNHcOOnHOgMVyBnelA3/Yz5H
         01e1iVKC8aAON4u7ak5N0blrp5yGi91AwHPukXS6A9Zz4HkCHimlec7O4d28B8nvmgvl
         VQj2dPy5JtZvYI+TC/YlzcLxxjoTzt7hxJa1wVXufQIy221m1/QIYLnLtePM27wl81er
       
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:to:from:subject:date:lines:message-id:references
         :mime-version:content-transfer-encoding:user-agent:in-reply-to
         :content-language:x-original-sender
         :x-original-authentication-results:reply-to:precedence:mailing-list
         :list-id:list-post:list-help:list-archive:list-subscribe
         :list-unsubscribe;
        bh=Q1om9gpedOzaS+WH3mOH+mX3EfBLcnKKZHePRILpiOQ=;
        b=D/Uy2V/cEH4OzDm9+cFrtOhwvFbsgzYg0nL3yTRiRzJ6uT6+CtCoFsVo/PvR3FCjWE
         ds/QGaZmCvKD8Cq/T2lRqYBqSZG61SIrJKp54j3R2uTKaOlJ90G/qI1hfImkFJjeFon3
         6cXzSOyfmwA9yahv4q++ran/nQB2WUJqMhx+v0oGa4uxPL9DqDUedt0nheA4UajDaAnk
         wQmOARj8TnjqeGGuUBVRZOpO3yjrK3q+t2PWsaaeepq3rAXABKdXQAldrq2CMSKb5RJa
         XN8U0J0cPTGaEj6cWS780bE5i0WYvcUV65qpgRsQ2RIz3m+03eazIXj3fqKkK 
X-Gm-Message-State: AIVw110MzkNMVB/52vr3Xx58yXADnYqHmqDOPP3ZBry+UnK++PUEJRnL
	qwcPr6JiGDk64w==
X-Received: by 10.129.138.65 with SMTP id a62mr4396793ywg.7.1501950167910;
        Sat, 05 Aug 2017 09:22:47 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.107.155.9 with SMTP id d9ls4927678ioe.40.gmail; Sat, 05 Aug
 2017 09:22:46 -0700 (PDT)
X-Received: by 10.107.29.135 with SMTP id d129mr4112499iod.6.1501950166482;
        Sat, 05 Aug 2017 09:22:46 -0700 (PDT)
Original-Received: by 10.55.24.220 with SMTP id 89msqky;
        Fri, 4 Aug 2017 20:50:15 -0700 (PDT)
X-Received: by 10.46.82.29 with SMTP id g29mr1546395ljb.19.1501905014292;
        Fri, 04 Aug 2017 20:50:14 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1501905014; cv=none;
        d=google.com; s=arc-20160816;
        b=TO2pKaC/pewWJu+QoK4aNCPjfb1IXihEdLnMcM1ID2Asx5QR5cFkSzaARY6VmarANt
         so8fYsP1hezIbfxcLETMsUnYXGdObsTWbqWPzfAH3juTU7GinjTrtluUP5akCdZxoWCL
         AIkWBFRYKD/8q8R99MK2oIw/psfKqVpDw+/s9PHnUj0dk+5oXf2i2w0H1n7yZQ8oDuMP
         zSO2PC6NTQC+zw8/TTMo9fbONHZ/wBAevHYb6s7lZsXCNzzNcOA3FhBqTwGjhrH/lINX
         Kg1d4X7gzKV5ZBf2O/sEjq2lfgT/PUvo+AP2wsmIgS7pde9XMbLpv4n1++u0scGzk+N9
         IhFg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=content-language:in-reply-to:user-agent:content-transfer-encoding
         :mime-version:references:message-id:lines:date:subject:from:to
         :arc-authentication-results;
        bh=XNI7VcMsYrucJQnLkmDJ7e4vWE1RYpWYk4gAuyucjEg=;
        b=oOhOo8ed0NdXYCH8woHu9vCpEeCj8ntIOLTAG0SEqtOqFinpPLJuQFJ6At5yH4/eu0
         YwB4a5vDxBsSiciVntYpSECNSAxqvswSeQD9ZuJCCdhN+lKk5yHd9lLS6xWxhRE9HH+0
         pEk8SElV+v/jhArATtXtWh4e0/bsYalDE+h9jcpc/vLfrOS0T7eARjw2aKYc1A4C61bc
         t+9GdrAA1wlCHXOBm25MZcExrwKOdTBfUrSVe9Tf8Z208FJngyEDmpgXkQUAlx/glPKd
         Isht08NmqSnc3FcQN9K5u/q8YsZIePiisT3qOWiqcY2o5dWnCwLOH0ewmJBLEHavr0rS
         EjZQ==
ARC-Authentication-Results: i=1; mx.google.com;
       spf=neutral (google.com: 195.159.176.226 is neither permitted nor denied by best guess record for domain of gclcip-std-proposals@m.gmane.org) smtp.mailfrom=gclcip-std-proposals@m.gmane.org;
       dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmail.com
Original-Received: from blaine.gmane.org ([195.159.176.226])
        by mx.google.com with ESMTPS id d16si1114195lfb.20.2017.08.04.20.50.14
        for <std-proposals@isocpp.org>
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Fri, 04 Aug 2017 20:50:14 -0700 (PDT)
Received-SPF: neutral (google.com: 195.159.176.226 is neither permitted nor denied by best guess record for domain of gclcip-std-proposals@m.gmane.org) client-ip=195.159.176.226;
Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2)
	(envelope-from <gclcip-std-proposals@m.gmane.org>)
	id 1ddq6H-0007S1-Jx
	for std-proposals@isocpp.org; Sat, 05 Aug 2017 05:50:05 +0200
X-Injected-Via-Gmane: http://gmane.org/
Original-Lines: 77
Original-X-Complaints-To: usenet@blaine.gmane.org
In-Reply-To: <da483e72-1a63-4ea1-80c4-8d63aa018db9@isocpp.org>
Content-Language: en-US
X-Original-Sender: philippeb8@gmail.com
X-Original-Authentication-Results: mx.google.com;       spf=neutral
 (google.com: 195.159.176.226 is neither permitted nor denied by best guess
 record for domain of gclcip-std-proposals@m.gmane.org) smtp.mailfrom=gclcip-std-proposals@m.gmane.org;
       dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmail.com
Precedence: list
Mailing-list: list std-proposals@isocpp.org; contact std-proposals+owners@isocpp.org
List-ID: <std-proposals.isocpp.org>
X-Google-Group-Id: 399137483710
List-Post: <https://groups.google.com/a/isocpp.org/group/std-proposals/post>, <mailto:std-proposals@isocpp.org>
List-Help: <https://support.google.com/a/isocpp.org/bin/topic.py?topic=25838>, <mailto:std-proposals+help@isocpp.org>
List-Archive: <https://groups.google.com/a/isocpp.org/group/std-proposals/>
List-Subscribe: <https://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>,
 <mailto:std-proposals+subscribe@isocpp.org>
List-Unsubscribe: <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>,
 <https://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:33606
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/33606>

On 08/04/2017 06:40 PM, Arthur O'Dwyer wrote:
> On Friday, August 4, 2017 at 1:07:31 PM UTC-7, Phil Bouchard wrote:
>=20
>     Hi ISO C++,
>=20
>     I have developed a deterministic memory manager in C++ and I was
>     wondering if ISO C++ would be interested to hear more about it.
>=20
>     For the moment I have included my solution in a brand new language I
>     call "BB++" because I need to add functionality that C++ doesn't yet
>     have such as:
>     - to add instances of an object implicitly as each scope;
>     - to add implicit references to these objects in top-level classes
>     - to overload 'operator .'
>     - to use 'auto' for member variables instead of 'decltype'
>     - to add metadata of the classes in order to propagate the proxy
>     associated to the pointers within those classes
>=20
>     The homepage of my project is:
>     https://github.com/philippeb8/root_ptr/tree/bb++/bbpp2cpp
>     <https://github.com/philippeb8/root_ptr/tree/bb++/bbpp2cpp>
>=20
>     And I have a 17 minutes presentation available here:
>     https://youtu.be/GrNDYWyasxg
>=20
>     Please let me know if this is the type of research you are
>     interested in. The work is a step away from being production ready.
>     It has to be noted that Root.Ptr is already faster than Shared.Ptr
>     in multithreaded mode.
>=20
>=20
> It would help if you could edit down that YouTube video to cut all the=20
> dead air; it's 17 minutes of which the relevant 5 minutes is scattered=20
> around separated by painful silent sections. Even at 200% playback=20
> speed, it's a slog.
> Certainly for your present purposes, /nothing/ prior to 6m22s is=20
> relevant. (Anyone who cares already knows how mark-and-sweep and=20
> refcounting work, and doesn't need a tutorial on the subject.)

Thanks I'll make the corrections this weekend.

> You never show code or diagrams for root_ptr in the video, but from the=
=20
> usage example and caveats, I infer that it is (almost?) exactly what=20
> Herb Sutter called a "deferred_heap" at CppCon 2016.
> https://internals.rust-lang.org/t/herb-sutter-deferred-heaps-and-pointers=
/4183
> Of course everyone has their own implementation of this idea; and there=
=20
> are plenty of hybrids, such as "local arena allocators", or mixing in a=
=20
> bit of refcounting to get Objective-C's "autorelease pools", or mixing=20
> in a bit of RCU to get "RCU domains", or whatever.

Firstly I would like to point out that I came up with the idea long=20
before Microsoft did (2011 actually). You can easily find references to=20
my previous attempts in the development Boost mailing list. Back in the=20
days my library was called: "block_ptr" and "shifted_ptr".

Secondly deferred_ptr is not production ready and doesn't support=20
multithreading mode whereas root_ptr was correctly unit tested and it=20
does support multithreading mode but I just need to optimize one mutex=20
(that is currently a static member) to make it even faster.

> Starting around 12m45s, the examples seem to be concerned entirely with=
=20
> showing examples of successful escape analysis =E2=80=94 that is, you cre=
ate a=20
> "node_proxy" (a.k.a. deferred_heap) and allocate some objects in that=20
> heap, and then you return a pointer to one of those objects from the=20
> current function. Normally this would cause=20
> dangling-pointer/use-after-free errors, but in this case your BB++=20
> language is doing some sort of "escape analysis" to promote the returned=
=20
> object into the surrounding scope. Some explanation of this promotion=20
> mechanism would be useful, since it's the one thing that's not obvious=20
> how to do in today's C++.

I will clarify what is currently happening at that moment in my next=20
video. Thanks for your patience.


Regards,
-Phil

--=20
You received this message because you are subscribed to the Google Groups "=
ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp=
..org/d/msgid/std-proposals/om3ev4%24hgg%241%40blaine.gmane.org.

.
