[collectd] Rare code in process.c?
Andrés J. Díaz
ajdiaz at connectical.com
Thu Sep 17 13:15:02 CEST 2009
Hi Florian (et al)
> you're right, the (re-)allocation of the memory can probably be avoided
> if the function is turned into one with the following prototype:
> -- 8< --
> static int *ps_read_tasks (int pid,
> unsigned long *ret_num_proc,
> unsigned long *ret_num_lwp);
> -- >8 --
Mmm, why not something like: "static int ps_read_task(pid)"?
This returns the number of task for pid passed as argument.
(AFAIK the function only return the number ot threads), why
we need the ret_num_proc and the ret_num_lwp parameters?
My proposal is attached (code is always cleaner than explanations :P)
Regards,
Andres
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bump-ps_read_task.patch
Type: application/octet-stream
Size: 2306 bytes
Desc: not available
Url : http://mailman.verplant.org/pipermail/collectd/attachments/20090917/a66aeea9/attachment.obj
More information about the collectd
mailing list