Writing portable code that reads /dev/kmem
Richard M. Mathews
richard at locus.com
Thu May 30 05:48:00 AEST 1991
cgy at cs.brown.edu (Curtis Yarvin) writes:
>Your best bet is to make a very explicit split between the portable and
>nonportable modules of the monitor daemon.
I might even go farther than that. I'd have a completely portable frontend
which only understands high level concepts like "get me the performance
data." For many systems, there will be a large amount of common code in
the non-portable backend; so I'd split it into 2 parts -- a semi-portable
piece which works with most systems and a completely system-dependent
piece which deals with each system's idiosyncrasies (such as the names
of the kernel variables). For a few systems, such as those which don't
let you directly read kmem at all, both of these pieces would be replaced
by a system-dependent module. On the majority of systems, however, the
semi-portable piece would be usable.
Richard M. Mathews Lietuva laisva = Free Lithuania
richard at locus.com Brivu Latviju = Free Latvia
lcc!richard at seas.ucla.edu Eesti vabaks = Free Estonia
...!{uunet|ucla-se|turnkey}!lcc!richard
More information about the Comp.unix.wizards
mailing list