delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2017/05/04/12:27:47

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:subject:to:references:from:message-id:date
:mime-version:in-reply-to:content-type
:content-transfer-encoding; q=dns; s=default; b=PAgatxlTv/mb+bD4
Q/vzDIcG/3UKwu1E1ZchXjLkDNkfI6+elQy3/dpEzZe5y/rzipGTOZb4/1MmnH5V
PbeY15DVcrdmIIDHvD7qgEEhAzL0ymEO4V0YAfMh/DlJ+6Xf8vUMupox8AcYslGQ
udTTgbIvk/t6SowN8s0KBN7FEuc=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:subject:to:references:from:message-id:date
:mime-version:in-reply-to:content-type
:content-transfer-encoding; s=default; bh=/emnwpWqpJ2abgXs7rKR5c
7qxxM=; b=a3nCsjA+ppSTm/MeJC2k0PAJ7E+JkWTfbD1cq6DFRgECUgbE5jOx1J
fTp4jDvOcPPkclMBFJ20z5hWqeGf6Kh8ovRVgCgonUNnKPieJsSU6O06T+YOG+s7
OGQmPwucFAcQCkzOkWBv6Ij+RxXKfWvCXd8UUsRa68klXe/nIdIDU=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
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
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
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)
Subject: Re: [ATTN: procps maintainer] RealPageSize
To: cygwin AT cygwin DOT com
References: <CA+Wt6ppc=KaDq_2C+FA5CLRfyr4wo=x+RKS-B=GQDX4Gjnow7Q AT mail DOT gmail DOT com>
From: Marco Atzeri <marco DOT atzeri AT gmail DOT com>
Message-ID: <b0d84a38-9352-c84a-a5b2-8a25c7fa5e04@gmail.com>
Date: Thu, 4 May 2017 18:27:12 +0200
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: <CA+Wt6ppc=KaDq_2C+FA5CLRfyr4wo=x+RKS-B=GQDX4Gjnow7Q@mail.gmail.com>
X-IsSubscribed: yes

On 04/05/2017 17:00, Marty Shannon wrote:
> This fix for php (posted by ricardohenrylee AT gmail DOT 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 <unistd.h>
>  #  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/<pid>/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

- Raw text -


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