simon-git: pid (master): Simon Tatham

Commits to Tartarus hosted VCS tartarus-commits at lists.tartarus.org
Sat Jun 17 21:38:07 BST 2017


TL;DR:
  f729fb2 Use splay trees for procs[] and pidset operations.

Repository:     https://git.tartarus.org/simon/pid.git
On the web:     https://git.tartarus.org/?p=simon/pid.git
Branch updated: master
Committer:      Simon Tatham <anakin at pobox.com>
Date:           2017-06-17 21:38:07

commit f729fb20df7d5968a46e12f022331ac5cd51aa2e
web diff https://git.tartarus.org/?p=simon/pid.git;a=commitdiff;h=f729fb20df7d5968a46e12f022331ac5cd51aa2e;hp=bac234dff398dcb736d0b8bab3d71a498b377443
Author: Simon Tatham <anakin at pobox.com>
Date:   Sat Jun 17 21:38:03 2017 +0100

    Use splay trees for procs[] and pidset operations.
    
    I hadn't actually realised that the Linux maximum pid could be
    reconfigured, until this program failed an assertion when I ran it
    recently on a machine where it had been and it encountered a pid
    bigger than its internal #define PIDMAX.
    
    So I needed a dynamic data structure to replace the big fixed-size
    arrays. The one I picked is certainly overkill for this problem, but
    it's nicely suited to it in principle, and I'd never implemented a
    splay tree before and thought the experience of getting one to work
    would not be wasted.

 pid.c | 354 +++++++++++++++++++++++++++++++++++++++++++++++++-----------------
 1 file changed, 263 insertions(+), 91 deletions(-)



More information about the tartarus-commits mailing list