[procps] Re: getpagesize, etc

  • From: Jim Warner <james.warner@xxxxxxxxxxx>
  • To: procps@xxxxxxxxxxxxx
  • Date: Thu, 2 Jul 2015 08:10:06 -0500


On Jul 2, 2015, at 7:54 AM, Craig Small <csmall-procps@xxxxxxxxxx> wrote:
Doesn't seem to make sense putting essentially the same function
in both libprocps and libc.

Agree, and getpagesize is even available under OS X (BSD).

Is it possible to use your chain trick with them?
Tht way the binary can ask for as much or as little as it knows, or
cares, about.

I don’t think chaining could/should apply to something like the jiffs.

What about that header file 'footprint' addition, which we could add as the 2nd
parm to every new call. Then, we can address size changes in the library at
some future point.

I've almost finished the slab work now, but I'm stuck with sorting.
The method is simple, it appears qsort with a comparator is the go.
I'm not sure if sorting should be in the library or out.

Yes, somehow it would be nice if sorting was included, thinking ahead to PID
(top/ps) needs.

But it’s complicated, as with top’s meminfo chains which are static and *could
not* be sorted.

Let me get more familiar with that slabtop guy and offer an opinion.

Regards,
Jim


Other related posts: