您的位置:首页 > 移动开发 > Android开发

Android -- SEGV_MAPERR,SEGV_ACCERR

2015-07-23 13:28 447 查看
Per siginfo.h:

SEGV_MAPERR means you tried to access an address that doesn’t map to anything.

SEGV_ACCERR means you tried to access an address that you don’t have permission to access.

So in both cases you accessed an address you shouldn’t have, which is probably the only thing your actual code is guilty of. In the former case there’s no memory in that address range anyway. In the latter case there is memory in that address range but you don’t own it.

If you were to access a random address then which you get depends on how the OS happens to have your process set up at that moment.

来自:http://stackoverflow.com/questions/19124925/what-is-the-meaning-of-code-in-segmentation-fault
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: