220 35457 <4c614758-259b-4eeb-b4f7-89c42ed0e4d4@isocpp.org> article
Path: news.gmane.org!.POSTED!not-for-mail
From: Ben Craig <ben.craig@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: On P0829 - a freestanding implementation
Date: Wed, 22 Nov 2017 12:09:40 -0800 (PST)
Lines: 58
Approved: news@gmane.org
Message-ID: <4c614758-259b-4eeb-b4f7-89c42ed0e4d4@isocpp.org>
References: <32147114.z48B4pQc9d@tjmaciei-mobl1>
 <CALnjya-Cxd_hyg7zwDotT-wGxh_DXgq3F0VCtmdtsw5Uoe7PXA@mail.gmail.com>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_11373_142227205.1511381380439"
X-Trace: blaine.gmane.org 1511381382 5832 195.159.176.226 (22 Nov 2017 20:09:42 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Wed, 22 Nov 2017 20:09:42 +0000 (UTC)
To: ISO C++ Standard - Future Proposals <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBDCM7T7A5UMRBBNT27IAKGQEBMA3Y2Q@isocpp.org Wed Nov 22 21:09:36 2017
Return-path: <std-proposals+bncBDCM7T7A5UMRBBNT27IAKGQEBMA3Y2Q@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-ua0-f199.google.com ([209.85.217.199])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBDCM7T7A5UMRBBNT27IAKGQEBMA3Y2Q@isocpp.org>)
	id 1eHbKx-00014k-Qe
	for gclcip-std-proposals@m.gmane.org; Wed, 22 Nov 2017 21:09:35 +0100
Original-Received: by mail-ua0-f199.google.com with SMTP id p33sf8486529uag.4
        for <gclcip-std-proposals@m.gmane.org>; Wed, 22 Nov 2017 12:09:43 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=date:from:to:message-id:in-reply-to:references:subject:mime-version
         :x-original-sender:reply-to:precedence:mailing-list:list-id
         :list-post:list-help:list-archive:list-subscribe:list-unsubscribe;
        bh=iJnWvPWng9zvo58SCh/V8JB+6vvO/Z/jymeDrDDESTM=;
        b=pt7Wa6rt6jfxwQzmi/lFJoJOPk0BUdgLSl92yzNaFFLQKf2cv7jRohIW6w3FYLsWky
         DBl3EDghB+1/a1c8STLfk+13aoIiy8CRzDas7DQGvJxjklL+WwSZWU9JCWlpeW9KqLhn
         QXLd2ZIY6Iw97o0eHExO+m/IUs9LXCvK7LE9vuDfQ6agKzTn7tu5Nge/ZeIzQ1xw+XeC
         vPHYbOkiUucXvtcfZy0M9Vd3v+AIA7GSfKXNEmhGJDys+Elq/EA9mg+8COwh/NZcnag7
         jHruj/exavpCdxdPC5Ip2TxSm9SAo2bixJ+mki/KI5tYd5H+76yCFC4H/0jmnnHpdVVj
         iYIw==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20161025;
        h=date:from:to:message-id:in-reply-to:references:subject:mime-version
         :x-original-sender:reply-to:precedence:mailing-list:list-id
         :list-post:list-help:list-archive:list-subscribe:list-unsubscribe;
        bh=iJnWvPWng9zvo58SCh/V8JB+6vvO/Z/jymeDrDDESTM=;
        b=WUz5fsqaOCEKiqKULaDj6mjc01l3iW/hc9a1nuqqptHb/NpRd/B7BAWJyIi/oP4PR/
         aePbAM//Rf8i6xeGeyYWNmjK9jPuv5eX3m5qjrpI14+UbbcF45NbfAMYVfO5I9IA3dgY
         caM3tTxZnXIPuh8I/xIRTHYEFuQqcoubjNr+viPiHcV6M6lTjYnmgHWxLmxS/r7lRNBC
         VbsnYQHGMyYequN+y2+2R5+74o96IO//O3m0SLz83Ghw2VO/CwfNerHcVK4539pnhj0n
         qDlkB8YZsym67v2khNlJuI5O4RaC130EOSVeyZSh248eK2StQBo+uenh0qBJ5LxaeTBU
         uszg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:date:from:to:message-id:in-reply-to:references
         :subject:mime-version:x-original-sender:reply-to:precedence
         :mailing-list:list-id:x-spam-checked-in-group:list-post:list-help
         :list-archive:list-subscribe:list-unsubscribe;
        bh=iJnWvPWng9zvo58SCh/V8JB+6vvO/Z/jymeDrDDESTM=;
        b=mDHedMh+l5aAhzm6AoRf2KZZS4gNLa17meD9CDUb6GoKkvqUXgCZnYbvnLmldBNX5E
         AecIblZgGamHkEWIwH345siu7IYPnh4HqiiyPoabwBOxX21IndEqzKwqHuUA5pj0pASD
         zJfg1rn2FScLiMr3M0QMGkHU9Ds4N+sXXxIlRgMap5KMNtBeI5Hp2GDyxAh5yEv0T1SS
         JM6e0xOOeuDCSg+kXgSiaaaRCtU4UxXwhOkGaBaxgN2dmKXhY0QgpmUpnQ3A4smD3a4N
         Yfi5wX6LCIAtvLKjZHzYYa3QhntbKCpQabwAVyhdZugBajQFS478FZL1/1r+W0rTJpHt
         DB3A==
X-Gm-Message-State: AJaThX6ryrGo/OOewDWi+12iW1qn7+G+juoU3WzCC8ZAsFBwBHGtm+V0
	QYn9ZpPov/o9Q83KtDJURpzpmA==
X-Google-Smtp-Source: AGs4zMaQV4kp391EHkBn2m+UFhrmyI0qtdd6kIK/AcU7rQrKCOZ4yJM66/PAyh1oLLRoXYPGnw9bug==
X-Received: by 10.31.69.149 with SMTP id s143mr10320831vka.11.1511381383006;
        Wed, 22 Nov 2017 12:09:43 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.31.151.69 with SMTP id z66ls1190205vkd.16.gmail; Wed, 22 Nov
 2017 12:09:41 -0800 (PST)
X-Received: by 10.31.161.87 with SMTP id k84mr14670vke.10.1511381381040;
        Wed, 22 Nov 2017 12:09:41 -0800 (PST)
In-Reply-To: <CALnjya-Cxd_hyg7zwDotT-wGxh_DXgq3F0VCtmdtsw5Uoe7PXA@mail.gmail.com>
X-Original-Sender: ben.craig@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:35457
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/35457>

------=_Part_11373_142227205.1511381380439
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Re: Thiago
I disagree with the assertion that the whole point of freestanding is that =
there is no library.  Even in the c11 spec, 5.1.2.1, there is wording about=
 the lack of an operating system, but in the same clause it talks about lib=
rary facilities.  Why does it matter if memcpy comes from a header or an ob=
ject file? Some non-functions even come from an object file (e.g. 64-bit * =
64-bit multiplication on i386).

Thiago mentioned Zephyr in an earlier post. It appears to allow the hosted =
newlib c library to be used, with the caveat that filesystem operations wil=
l error at runtime. This kind of support for existing c libraries is very c=
ommon.


Re: Mathias
I do not know of a standards conforming way to make throw trap without incu=
rring the space overhead of exception tables. I can set the terminate handl=
er or the unexpected handler, but both of those happen too late. I'm not tr=
ying to argue the speed benefits of exceptions vs. no exceptions, I'm argui=
ng the size difference, particularly when my error handling strategy is "re=
boot".  I don't make that very clear in r0 of my paper though.

For floating point, it isn't about the size or speed of floating point. My =
concern is that in kernels, you can't use floating point without making ext=
ra, non portable calls. If you do use floating point without the non-portab=
le save/restore calls, you corrupt user mode.

There are different heap arguments depending on the environment. In kernel =
mode, the issue isn't the lack of a heap, but what the default heap should =
be. Do you choose the plentiful, but unsafe paged pool? Or do you choose th=
e scarce but safe nonpaged pool?

For embedded, the concern is fragmentation. These devices are supposed to r=
un for years at a time without restarting. To accomplish that, you need to =
avoid all transient allocation.  Allocations at startup are fine.  If you g=
et rid of all transient allocations, you basically get rid of all stl alloc=
ations.

Also note that the standard library does not permit allocators to signal fa=
ilure by returning nullptr. That means that using stl allocators requires e=
xceptions.

--=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/4c614758-259b-4eeb-b4f7-89c42ed0e4d4%40isocpp.or=
g.

------=_Part_11373_142227205.1511381380439--

.
