ANRMonitorDemo icon indicating copy to clipboard operation
ANRMonitorDemo copied to clipboard

getThreadIdFromThreadPtr异常

Open TChengZ opened this issue 3 years ago • 0 comments

看了源码,简直卧槽,但有个疑问,jni里getThreadIdFromThreadPtr的方法 //reinterpret_cast 强制类型转换 int *pInt = reinterpret_cast<int *>(nativeThread); //地址 +3,就是ThreadId,这个怎么来的呢? pInt = pInt + 3; 为啥pInt+3是真实的ThreadId呢,这个和java层获取的thread.getId又有啥差别

TChengZ avatar Jul 03 '21 14:07 TChengZ