Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"

Liste des GroupesRevenir à l c 
Sujet : Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"
De : 433-929-6894 (at) *nospam* kylheku.com (Kaz Kylheku)
Groupes : comp.lang.c++ comp.lang.c
Date : 07. Mar 2024, 19:18:14
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <20240307083608.237@kylheku.com>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
User-Agent : slrn/pre1.0.4-9 (Linux)
On 2024-03-07, David Brown <david.brown@hesbynett.no> wrote:
On 07/03/2024 12:44, Michael S wrote:
GC does not stop fragmentation, but it allow heap compaction to be
built-in part of environment.
>
No, GC alone does not do that.  But heap compaction is generally done as part of a GC cycle.
>
Heap compaction requires indirect pointers.
I believe, it doesn't, or doesn't have to. The garbage collector fixes
all the pointers contained in the reachable graph to point to the new
locations of objects.
If some foreign code held pointers to GC objects, that would be a
problem. That can usually be avoided. Or else, the proxy handles
can be used just for those outside references.
A simple copying garbage collector moves each object on the first
traversal and rewrites the parent pointer which it just chased
to point to the new location. Subsequent visits to the same object
then recognize that it has already been moved and just adjust the
pointer that had been traversed to reach that object.  The forwarding
pointer to the new location can be stored in the old object;
most of its fields are no longer needed for anything.
The space required for the scheme can be regarded as equivalent
to fragmentation, but it's controlled.
The worst case exhibited by fragmentation (where the wasted space is
proportional to the size ratio of the largest to smallest object) is
avoided.
Now, copying collection is almost certainly inapplicable to C programs;
it's not something you "slide under" C, like Boehm. We have to think
outside of the C box. Outside of the C box, interesting things are
possible, like precisely knowing all the places that point at an
object.
--
TXR Programming Language: http://nongnu.org/txr
Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal
Mastodon: @Kazinator@mstdn.ca

Date Sujet#  Auteur
7 Mar 24 * Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"23David Brown
7 Mar 24 +* Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"15Michael S
7 Mar 24 i`* Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"14David Brown
7 Mar 24 i +- Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"1Kaz Kylheku
8 Mar 24 i `* Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"12Paavo Helde
8 Mar 24 i  +* Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"3David Brown
8 Mar 24 i  i`* Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"2bart
8 Mar 24 i  i `- Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"1David Brown
29 Apr 24 i  `* Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"8Lawrence D'Oliveiro
29 Apr 24 i   +* Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"5Chris M. Thomasson
29 Apr 24 i   i`* Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"4Kaz Kylheku
29 Apr 24 i   i `* Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"3Chris M. Thomasson
29 Apr 24 i   i  `* Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"2Kaz Kylheku
29 Apr 24 i   i   `- Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"1Chris M. Thomasson
29 Apr 24 i   `* Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"2paavo512
29 Apr 24 i    `- Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"1Chris M. Thomasson
7 Mar 24 `* Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"7Kaz Kylheku
8 Mar 24  `* Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"6David Brown
8 Mar 24   `* Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"5Michael S
8 Mar 24    `* Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"4David Brown
8 Mar 24     +- Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"1Michael S
29 Apr 24     `* Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"2Lawrence D'Oliveiro
29 Apr 24      `- Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"1aph

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal