On Saturday 30 June 2012 20:34:51 Craig Small wrote: > As part of the fixup of libprocps I have looked into what function calls > and what symbols are used from the existing library. You can see the > list at https://gitorious.org/procps/pages/OldLibprocCalls since the SONAME so far has been changed on a per-package basis, we can freely break anything in newer versions without affecting the status quo. before deciding on a new interface, we should differentiate between the expected consumers: some are for procps utilities, and so the ABI does not need to be stable. some are for 3rd party packages though, and those have to be given the most consideration. > From this list we can then start to get some idea of what the new API > should look like. For example, meminfo() exposes a lot of variables > (the kb_* ones). I would suspect in a new API the new meminfo() or > whatever it would be called would return a structure with the kb_* > information in it. returning a structure vs references to variables is more or less the same thing in terms of "messiness". you're locked into exporting the same structure layout all the time, and can only append new entries. there is a slight advantage to using a structure over multiple variables and that's related to relocations -- a structure is one relocation and then pointer offsets, where as multiple variables are each a relocation. -mike