Get process id from native code?

Put problems with the Android NDK in this forum.

Get process id from native code?

Postby paulscode » Sat Dec 11, 2010 2:21 am

I need a way to determine the process id so that I can print the contents of /proc/(pid)/maps to logcat (for memory map debugging purposes). Is there a native equivalent of the following Java method:

public static final int android.os.Process.myPid()

Or alternatively, is there a way to somehow call the above method from the native code (through JNI perhaps). I am still pretty new to the NDK, so I apologize if this is super obvious.
paulscode
Experienced Developer
Experienced Developer
 
Posts: 79
Joined: Thu Nov 11, 2010 3:57 pm

Top

Return to NDK Problems

Who is online

Users browsing this forum: No registered users and 4 guests