X-Recipient: archive-cygwin AT delorie DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7930A385041A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1631081744; bh=+AmxEhPzftBwF8VDSaCHGM74FIz7+93seIeMiPjP4zM=; h=Subject:To:References:Date:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=kfj0VHxJNVXEF1UWHZfjWzBlf+RjREYwjv7SWnWdjDuzrMvN9B+X2AityP7my0E1n aTvVSNWWt94PY2mtZMQCE6V9jxI8469a1N4Fgk7554BTwVgeWRd12m0qEoKE1jkE/x aE5MKKtBjfIu1aLLR7H9hRJs4vmpMoa+o/fNCt9Y= X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 059CC3850434 X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Subject: Re: mmap failure [was: cygrunsrv + sshd + rsync = 20 times too slow -- throttled?] To: cygwin AT cygwin DOT com References: <88fde5d5-4897-8792-576a-a62be0092ad8 AT cornell DOT edu> <94b5b6cf-1670-cbdd-2f51-84dae09d27b6 AT cornell DOT edu> <387d9062-1ff9-6eab-e268-e5070352a193 AT cornell DOT edu> <40275f71-7c10-55a9-e6c8-a948e32c37ac AT cornell DOT edu> <33ae27cb-4e45-7484-40d1-6cbd88c958f1 AT cornell DOT edu> <3a63eb8c-3e8e-cd2c-b9de-8c34fa041a75 AT cornell DOT edu> <5b705ae7c9747a9cc25d2610cc6748e92bbe1d70 DOT camel AT dontech DOT dk> <890dad21-dec5-cdd1-bf99-bdb45e759a71 AT cornell DOT edu> <742331ee-4d9f-e86f-9314-c85b5f0cbfa8 AT SystematicSw DOT ab DOT ca> <3bb3814c-0584-c918-6710-f71c7abfbcc5 AT cornell DOT edu> <07cb816c-0bca-440d-338d-fefb110d4a41 AT cornell DOT edu> Message-ID: <387bef5e-1352-daef-b9c2-bfc761d442ee@gmx.com> Date: Wed, 8 Sep 2021 07:14:45 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 In-Reply-To: <07cb816c-0bca-440d-338d-fefb110d4a41@cornell.edu> Content-Language: en-GB X-Provags-ID: V03:K1:a4TF0tX0icsmKRA69XTx0tvso4DFfh6lN4ps52OX5WG67XU9FCH b2VUhNFL/9QDOPGs76kY5d/JTfP6ZeH3DDKd0+EDcjOOInZexdqYiT/U0Li9Aw/9OBGIbJd /NxafNrtPHLHy4N2R1V+65vUOs6OL8GAuYymNlldcpbpVNNZgGUEtcpzW/R7yvLxAaM8J4C HPwY4bRw0yPJbYUue4BxA== X-UI-Out-Filterresults: notjunk:1;V03:K0:JQ5x7pncYhY=:HmHvMtuo//Tg3Uk+5bF29F 8tGJJMFnUn+1ySTA1UcyuBJW45br8panXTNQXWGSX/U6eoj8MH6Lo8kC6ddCXWZ1yqjii1lpk fsqynYDqtC/bfP3Cx8mqavbSUOQqqpq0Y7l5fIwDqXCsyFZ8pnnPJ5OQetxI7HYnR8Syitc7t viok+4rl43SpNuLjmzlbXB0Sib0uGCSJUglcO8kjsJb7Ck7JOEuxVSQZgXQg0x8hlQCOFTrZH oPAMl5DaJMFdfm4odoU4BlprHLXGQE7x2t2zEJJXteB9bxCofUbEGr3mvfL9aC392MP8JfLbC TjQtgqJRlbtwP3QEXdWRnT0HAHVNjKiZZWITBIxzeLezczzrxsCpmamU2MkPhyiyJTkkeCtyV JEQXhZf69SfMUhDHQtCh59+XOmaZ9ca3d/gi85iwd58XXvfCgRrGA8CxcQ1NbB7tqvUHCNn/b 6RvKLql2seYWmeydv5cKFKdEj240xGH/sRvl2GGALcF35MCO7zMmJvzbmkRw1h0LVBbrSDeoY i3LDI40hSaRqUrktPBVtz+RUlcmEl9Dd4Frt3wMrCHByc+4eeaQXrpTpTOtpTZ7asqv05EIVd 8szxm5k1JLq6zBk3j57/auebWAJ8ZAnyi9eH0PquJ5PN/scTJPu5yqwCALSRsMvvcYcjAob1s IE5wAG6D403jtpYm93tsmyU/UiLc16qVsP5/JZa7BDvKyShdwaQg4zBcrc0Fe1y0wN2EO0pCv QjMMJGQvz0rsSUYUEcQ8x8FAYVRl01zQT9Qb8bdspaEZZZJYWYqTMa3sijF8AizF6HQhlxRIR bJsns/sXVthvfW9C8gLGwOEUbL7VWjEFBTT3wCCDbi1J9xPAXsoaLu7su3p4il+CaYgHt37O/ uHrP4FazInv/kaFjkZM4IpRpeXpSXggcrM52ZwQwQqYVQU6RU9aDxkDY8FMPpyyxy0NGKm8JY XNIK67BT3KZ/Hnp8gMvcctI2q422NlR1tiBfO7LLEQQ59PcUKNe3TiOnn8RVNKglaNBz+yDGV 1F0DohrufvsY1yznLRDGIRJRQR/te3XimjNFHUzIR3mV4xl6G/mORl7NsTrxtzkG2evW7NGoB CpeQZwOYTIzUBOWfSpZyBt6I1vWs4wNqhRoBm5X4W5Nt73H0jnNkX4dbw== X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, FREEMAIL_FROM, NICE_REPLY_A, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: cygwin AT cygwin DOT com X-Mailman-Version: 2.1.29 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Sam Edge via Cygwin Reply-To: Sam Edge Content-Type: text/plain; charset="utf-8"; Format="flowed" Errors-To: cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com Sender: "Cygwin" Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by delorie.com id 1886Fk15013369 On 07/09/2021 23:44, Ken Brown via Cygwin wrote: > > MS can't add a new named field to a documented struct without breaking a lot of code.  I think it's extremely unlikely that they would do that.  On the other hand, I think it's very likely that a reader of the Cygwin code would be confused by code that initializes a struct to 0 prior to assigning a value to every member. Hi Ken. It is common practice when following a coding standard (especially those for safety or security sensitive code) to initialize each and every automatic C/C++ variable at the point of definition even if it is later assigned a value. The '= {0}' mechanism for structures is a common way of ensuring this is the case for all fields in a structure and should be familiar to most developers. This ensures deterministic behaviour instead of bugs that come and go depending upon what was on the stack or in the register before the variable is used. It also helps when reviewing code. A compiler or static analyser cannot always determine whether a variable is used before it's assigned so getting into the habit of doing this saves a lot of grief down the line, as demonstrated by this thread! -- Sam "Here Endeth The Lesson" Edge -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation: https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple