How to judge whether the incoming buffer is valid in C++? – CentOS
In my function, a memory pointer and its size are passed as parameters: int myFun(uintptr_t* mem_ptr, int mem_size) { // Code here } Is there any way to tell if this chunk of memory is really valid? (The Operating System…