Deutsch English Français Italiano |
<usc58s$10cls$1@dont-email.me> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!weretis.net!feeder8.news.weretis.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: David Brown <david.brown@hesbynett.no> Newsgroups: comp.lang.c++,comp.lang.c Subject: Re: "White House to Developers: Using C or C++ Invites Cybersecurity Risks" Date: Thu, 7 Mar 2024 11:35:08 +0100 Organization: A noiseless patient Spider Lines: 26 Message-ID: <usc58s$10cls$1@dont-email.me> References: <us0brl$246bf$1@dont-email.me> <us1lb5$2f4n4$1@dont-email.me> <us2lfh$2ltj3$5@dont-email.me> <us2s96$2n6h3$6@dont-email.me> <us3155$2of1i$3@dont-email.me> <us4c66$346tp$3@dont-email.me> <us5d6f$3besu$3@dont-email.me> <20240305005948.00002697@yahoo.com> <us5u16$3eidj$2@dont-email.me> <20240305111103.00003081@yahoo.com> <us8821$90p$4@dont-email.me> <20240306140214.0000449c@yahoo.com> <us9nib$dski$1@dont-email.me> <20240307000008.00003544@yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Thu, 7 Mar 2024 10:35:08 -0000 (UTC) Injection-Info: dont-email.me; posting-host="245d9d51a5b8141454201d689c1fd16e"; logging-data="1061564"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/GbNkqFuAasfpz/MQOVSWzoMoNi5vmges=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Cancel-Lock: sha1:hKhxbXbhl1cGT2dnYy5W/hPX/Nw= In-Reply-To: <20240307000008.00003544@yahoo.com> Content-Language: en-GB Bytes: 2782 On 06/03/2024 23:00, Michael S wrote: > On Wed, 6 Mar 2024 12:28:59 +0000 > bart <bc@freeuk.com> wrote: > >> >> "Rust uses a relatively unique memory management approach that >> incorporates the idea of memory “ownership”. Basically, Rust keeps >> track of who can read and write to memory. It knows when the program >> is using memory and immediately frees the memory once it is no longer >> needed. It enforces memory rules at compile time, making it virtually >> impossible to have runtime memory bugs.⁴ You do not need to manually >> keep track of memory. The compiler takes care of it." >> >> This suggests the language automatically takes care of this. > > Takes care of what? > AFAIK, heap fragmentation is as bad problem in Rust as it is in > C/Pascal/Ada etc... In this aspect Rust is clearly inferior to GC-based > languages like Java, C# or Go. > Garbage collection does not stop heap fragmentation. GC does, I suppose, mean that you need much more memory and bigger heaps in proportion to the amount of memory you actually need in the program at any given time, and having larger heaps reduces fragmentation (or at least reduces the consequences of it).