I'm currently working on a project for my "Theory of Programming Languages" class. It requires us to write 2 programs, one to test a math function's speed and "system resources used" in Java, and one in C (using the same math function). I can do the timing part in C and Java fine, but i have no idea how to measure the system resources used by a function in either language. I'm particularly clueless about doing it in C, because i don't really know C very well. I have a reasonable understanding of C++... that's as close as I've gotten to C.

Does anyone have an idea of what I should do to measure the system resources used by a function? Google searches haven't turned up any relevant results from which i could garner any useful information. The project is due a week from wednesday. I've tried asking the professor what he means, but he is, simply put, a poor teacher--he just repeats "you have to measure system resources" without adding anything and or clarifying anything. My classmates seem to be as in the dark as I am.

Any help would be greatly appreciated.

I'm NOT asking to have code written for me. I just want people with more experience with programing than myself to interpret this assignment and perhaps clarify what i should do, point me to a relevant tutorial, or give me some tips.