delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/06/03/15:38:09

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
X-ME-UUID: 20050603193746926 DOT E211F1C00339 AT mwinf0403 DOT wanadoo DOT fr
Message-ID: <001701c56873$6a20f640$96cefea9@none>
From: "Christophe Jaillet" <christophe DOT jaillet AT wanadoo DOT fr>
To: <cygwin AT cygwin DOT com>
Subject: memset & 'VirtualQuery'
Date: Fri, 3 Jun 2005 21:35:35 +0200
MIME-Version: 1.0

[sorry for the wrong post in cygwin-patches...]


   Hi,

when looking thrue cygwin code looking for function 'VirtualQuery', we can
see that it is passed a structure (MEMORY_BASIC_INFORMATION).
In some cases, this structure is memset'ed to 0 before the call, sometimes,
not.

My very own opinion about it, is that there is no need to reset the content
of the structure before the call and in some places a call to memset can be
avoided.

Here is a list of the call to 'VirtualQuery' which uses memset and could be
optimised :
   - cygthread.cc (terminate_thread)
   - fork.cc (stack_base)
   - exceptions.cc (interruptible)

All the other calls to 'VirtualQuery' don't use memset.

If you think it is useful, I can provide a patch for this in the next few
days.

CJ





--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019