1

This question already has an answer here:

I've been looking into the getrusage function, which I see a prototype for within the file
/include/linux/resource.h. I've tried to trace the directives to find where the actual function is, but I haven't found it. Does anyone know where it is?

marked as duplicate by muru, derobert, A.B, telcoM, andcoz Jun 28 at 12:56

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 1
    You mean the implementation of it? It's part of the GNU C library. You would have to get that library's source code. – Kusalananda Jun 26 at 17:13
  • Oh. Thank you!! – Ramsey Alsheikh Jun 26 at 17:21
  • getrusage(2) is a system call, the getrusage(2) function from the GNU C library is just a thin wrapper (which may even be autogenerated). The getrusage() linux kernel implementation is here. – mosvy Jun 27 at 5:08

Browse other questions tagged or ask your own question.