Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 15 Nov 2016 18:18:51 -0800
From:      Conrad Meyer <cem@freebsd.org>
To:        Matthias Andree <matthias.andree@gmx.de>
Cc:        Benjamin Kaduk <kaduk@mit.edu>,  "freebsd-hackers@FreeBSD.org" <freebsd-hackers@freebsd.org>, Mark Linimon <linimon@lonesome.com>
Subject:   Re: sbrk(0) replacement for memory resource tracking?
Message-ID:  <CAG6CVpVFz7iKG7tms_626p8a7LW2_GwHT5expkDgKHCk-aRnNA@mail.gmail.com>
In-Reply-To: <a8a85ea4-b9af-cc6a-0573-d23967b4d82c@gmx.de>
References:  <20161110012624.GA23701@lonesome.com> <dd964b1d-db3c-94d4-794b-929b28326430@gmx.de> <20161110215549.GL91607@kduck.kaduk.org> <a8a85ea4-b9af-cc6a-0573-d23967b4d82c@gmx.de>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Nov 10, 2016 at 2:26 PM, Matthias Andree <matthias.andree@gmx.de> wrote:
> OK. So the quick and dirty way to re-enable e2fsprogs on those
> architectures whilst scrapping any memory statistics would be to #define
> sbrk(a) (a) which would just invalidate stats, providing the application
> handles bogus data.
>
> Other than that, it would seem that mallctl("epoch", ...) to synch up
> stats, and mallctl("stats.active", ...) or perhaps or "stats.mapped"
> gets me close to what comparing sbrk(0) over process lifetime would have
> achieved, wouldn't it?  This is assuming sbrk() had page granularity
> anyhow and stats.active provides exactly that (gross memory allocated).
> Possibly this also wants mallctlnametomib and mallctlbymib for
> optimization if called often. Right?

Yes, something exactly like that (jemalloc-specific) or perhaps
libprocstat (FreeBSD-specific).

Best,
Conrad



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAG6CVpVFz7iKG7tms_626p8a7LW2_GwHT5expkDgKHCk-aRnNA>