Posix Thread Programming

Hello,

i have 2 questions:

  1. Can I get the current memory usage of a thread?

  2. Can I use a member-function as (void*)(*)(void*) method to create a new thread with "pthread_create(...)"??

I would be happy about any suggestion.

Regards,

Rolf

  1. yes, you can.
    you can do force convertion. In C, the any convertion is allowed, but you should guarantee the safety.
  1. Not really - but read the getrusage man page for details

edit:
should have mentioned pthread_attr_getstacksize(), which gets memory allocated to the stack.