From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 125268 invoked by alias); 4 May 2017 16:27:31 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 119532 invoked by uid 89); 4 May 2017 16:27:23 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,FREEMAIL_REPLY,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=no version=3.3.2 spammy=measuring, Hx-languages-length:834, attn X-HELO: mail-wm0-f53.google.com Received: from mail-wm0-f53.google.com (HELO mail-wm0-f53.google.com) (74.125.82.53) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 04 May 2017 16:27:21 +0000 Received: by mail-wm0-f53.google.com with SMTP id u65so1575475wmu.1 for ; Thu, 04 May 2017 09:27:23 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=un8AJTNsnTUn28CdFKoYkQUHSvMuXYwGAdBY9PQ8VNU=; b=GnILv3P8dJh9vbSQdqev7F+unflpMSUgoGcKlUIq2ID6g+hi9C82wt79+uCA56jV+t jEUFdsYf2syhdmp5t0bjb9ykjMNhsc6/VjzkKWZRWPXDdyNwqyI0HQ6v4tFPZimtMmsI h+OJGJNz2qihthv+qtxypOpsNbv6xjcIFq3Zu3KwX5OCzZeYNTR9+nIbi+y3oGWW0JDb T1qaMAR7HO762D+m+OmMYK3aba7iqgCmz2ASrtNXr3o8aJSf4o6G3TfaUK4U6o6HV84s 4VIFwksb9vqEZeQ9fhTBrv25utbir5PKQ1zJFUDbH/V0TTYT+iTCZlmIJJeoAzLz/Lag JNIw== X-Gm-Message-State: AN3rC/5DNLe2qiI5JcKHk8MXA+zyfZ+09fpZUvd418GfQt7xCnxo+BVr Pyxhsuod9DZ1LdxiVhc= X-Received: by 10.28.236.205 with SMTP id h74mr2411977wmi.92.1493915241786; Thu, 04 May 2017 09:27:21 -0700 (PDT) Received: from [172.21.188.226] ([62.154.173.198]) by smtp.googlemail.com with ESMTPSA id v52sm3441132wrc.53.2017.05.04.09.27.21 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 04 May 2017 09:27:21 -0700 (PDT) Subject: Re: [ATTN: procps maintainer] RealPageSize To: cygwin@cygwin.com References: From: Marco Atzeri Message-ID: Date: Thu, 04 May 2017 16:27:00 -0000 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2017-05/txt/msg00051.txt.bz2 On 04/05/2017 17:00, Marty Shannon wrote: > This fix for php (posted by ricardohenrylee@gmail.com) should be > applied to the code for "top"; it (and /usr/bin/time -v) think the > page size is actually 64k, and reports RESident size as 16 times what > it should be. > > # if HAVE_UNISTD_H > # include > # if defined(_SC_PAGESIZE) > +# ifdef __CYGWIN__ > +# define REAL_PAGE_SIZE 4096 > +# else > # define REAL_PAGE_SIZE sysconf(_SC_PAGESIZE); > +# endif > # elif defined(_SC_PAGE_SIZE) > # define REAL_PAGE_SIZE sysconf(_SC_PAGE_SIZE); > # endif > > Cheers, > Marty > How is top measuring the memory of process ? /proc//statm should report the correct info in sysconf(_SC_PAGESIZE) = 64K units. https://cygwin.com/ml/cygwin-patches/2016-q4/msg00009.html Regards Marco -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple