mmap reading stale array of integers from an file
问题 I'm trying to read matrix of integers from file using mmap. If I receive it as char pointer from mmap function, I see everything correct but if I use int pointer, it gives me stale data. Problem with using char pointer is that I need to parse whole string using strtok or something else and get integers one by one. My matrix size is going to be 4k * 4k hence making that many calls to sscanf and strtok is not efficient. Please look at the program and output #define INTS 3 * 3 int main() { FILE*