I'm not sure about the overhead, but it could potentially be significant given that it requires a system call.