Sujet : Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks"
De : david.brown (at) *nospam* hesbynett.no (David Brown)
Groupes : comp.lang.c++ comp.lang.cDate : 09. Mar 2024, 13:25:27
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <ushkfm$2ai73$1@dont-email.me>
References : 1 2 3 4 5 6 7 8 9 10 11 12
User-Agent : Mozilla Thunderbird
On 08/03/2024 22:23, Chris M. Thomasson wrote:
On 3/6/2024 2:18 PM, Chris M. Thomasson wrote:
On 3/6/2024 2:43 AM, David Brown wrote:
[...]
This is a fun one:
// pseudo code...
_______________________
node*
node_pop()
{
// try per-thread lifo
// try shared distributed lifo
// try global region
// if all of those failed, return nullptr
}
Just to be clear here - if this is in a safety-critical system, and your allocation system returns nullptr, people die. That is why you don't use this kind of thing for important tasks.