From owner-freebsd-hackers@freebsd.org Fri Sep 11 13:29:54 2020 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E4FF83DA513 for ; Fri, 11 Sep 2020 13:29:54 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound2k.ore.mailhop.org (outbound2k.ore.mailhop.org [54.148.219.64]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4BnxSf3JD9z4LMY for ; Fri, 11 Sep 2020 13:29:54 +0000 (UTC) (envelope-from ian@freebsd.org) ARC-Seal: i=1; a=rsa-sha256; t=1599830993; cv=none; d=outbound.mailhop.org; s=arc-outbound20181012; b=iAYOTdFc/d1SaKrPg9uRZAnYdcCQnQsF8EmJmpU/pciTQN8GU+uyzPxJikZJiO3QEgPHqCYHqmwy7 Xq+K4dmA1izHOpnM3UjdlNlhWvIu6XsokfaMArlsN6/P6PaG0qht93bGFAi3uPlTGXaQcTUd+JNUdL HFIpXlOX7Fz9VrELQfaClStHstcHtnKUSmMfiCpILpGJCqlqFKkYLh40Dkhpw7JrRXtPC+/ibe3QtK zpU2qnP7m+n7KKpvxZEh8wTi6mY3FVQ6sa95byVQX3vyN7QYKxk9tlkSmr2Sbr1T618dyJcGqqhqLc o+ejoyjJ3q1tmrdmNutfHL9AdjUtGiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=arc-outbound20181012; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:to:from:subject:message-id:dkim-signature:from; bh=B1MwtOZtlLulqs+uoQ0KnrbVIrF9hN/8cumfY2Z6ksw=; b=gaJHlKNwNpFVn86Xi23p/F4Ee4gwtXU8ST9PKLSG3HMGgEZsY2p/wCAkxOGTqM4iXzlaVd9DRe3Dx ODL+VdyZIAm1DClf2trZ15InO9eX2OzXxdt3WKdU7HaI43WxRsgzeV690tJaCcXprcj+WOcaim8Mmx 4w2VCGEX69Oe33b7hN9VnSMs0iFUvnNTgjvjWpye6myWOlRzQY0LXtBb9LAL8E33Qp0Xf7JTYwLkB2 QT6lelzHUbcpD0uaB6yl2y5bfX5SpGn3EMQ56yHDAl2t0WixLo4KWJYnIEJGaQ39Is1ADV4vLPWG4h Y0B9NAm4xatPXjkgcnzqUVoEwD55Zgg== ARC-Authentication-Results: i=1; outbound4.ore.mailhop.org; spf=softfail smtp.mailfrom=freebsd.org smtp.remote-ip=67.177.211.60; dmarc=none header.from=freebsd.org; arc=none header.oldest-pass=0; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=dkim-high; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:to:from:subject:message-id:from; bh=B1MwtOZtlLulqs+uoQ0KnrbVIrF9hN/8cumfY2Z6ksw=; b=etuHs7qi+chcbe5v6pb+S67Xww09y/7GwBZ0DAc1uLj4cPohN63E2PLxGFOXW5uPMR8/jyY1P91Gx iuuLa45LsYLsX/L4Cxu2XoC5OohJOnsvwZBJd54SBPwO/xlKhsl2cBrlqHLEGWT+5iFR9F5bdCpW2t OoLovc1QrribQkJ3uwrzNcw7pUyXi8XZcQqWrvNcI9wYJ1yUpAIpJzN40mB2LZF8XMqzymOhIcxDoI yVPAPYcNHGynMiHQqzm3Kuhl7dVSSflzhdm82MHIatx/x7W51dWM7fNA6MSwsyUQ5DnXRe0iGPbovK T/E/yJJCBRpTvJpYNLKMVbmgU7LnFyw== X-MHO-RoutePath: aGlwcGll X-MHO-User: deafb204-f432-11ea-9e11-df46ed8f892f X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 67.177.211.60 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (c-67-177-211-60.hsd1.co.comcast.net [67.177.211.60]) by outbound4.ore.mailhop.org (Halon) with ESMTPSA id deafb204-f432-11ea-9e11-df46ed8f892f; Fri, 11 Sep 2020 13:29:51 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id 08BDToI9080860; Fri, 11 Sep 2020 07:29:50 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <2db16d9822eab8fb536eaf705d6378487c7994ae.camel@freebsd.org> Subject: Re: Determing Heap and stack size of running process. From: Ian Lepore To: SHAMANTHA KRISHNA K G , freebsd-hackers@freebsd.org Date: Fri, 11 Sep 2020 07:29:50 -0600 In-Reply-To: References: Content-Type: text/plain; charset="ASCII" X-Mailer: Evolution 3.28.5 FreeBSD GNOME Team Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4BnxSf3JD9z4LMY X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [0.00 / 15.00]; local_wl_from(0.00)[freebsd.org]; ASN(0.00)[asn:16509, ipnet:54.148.0.0/15, country:US] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Sep 2020 13:29:55 -0000 On Fri, 2020-09-11 at 16:36 +0530, SHAMANTHA KRISHNA K G wrote: > Hello All, > I want to know the *size of heap and stack for a running > process* ,how > it can be done, if I* don't *see any* [stack ] *or* [heap] *in the > output > of */proc/pid/map* and also the platform does not allow installing > *third party > freebsd utilities like valgrind.* > > Thank you, > -Shamantha > Use procstat(1). For example "procstat -v " will show all the memory mappings for that process. If you need it from within a program you're writing, "man libprocstat" will get you some info on how procstat(1) does its work. -- Ian