Buffer overflow using textscan happens in windows but not in mac
4 views (last 30 days)
Show older comments
Hi there,
I'm using textscan to import a big JSON file with the following line:
MyString = textscan(fid, '%s','Headerlines',0,'Delimiter','!','CollectOutput',1,'EndOfLine','\n','BufSize',50*1024*1024);
As you see, I use textscan to read the file in a single string, because I need to parse it. The file has 43 MB.
Setting the BufSize to 50 MB will make the import work in windows 7. But under Mac, setting the BufSize to 2 MB is enough and the program will work.
Why are there such differences between mac and win? thanks
0 Comments
Answers (1)
Jan
on 3 Apr 2012
This is a question for the technical support, because the source codes of textscan are not public.
0 Comments
See Also
Categories
Find more on Text Data Preparation in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!