I was trying to think of efficient ways to read large files (20-110MB) into memory. I have a function where I must read an entire file, assign it to an unsigned char*, and then pass it to another function for evaluation. The char* must represent the contents of the file.
Is there a way to efficiently do this, or is the best method to simply read the entire file in one chunk? Obviously there will be a performance hit if many files have to be read. Consider doing this for data over the count of 10GB...
Any ideas are greatly appreciated.