Buffer overflow using textscan happens in windows but not in mac
4 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(1 个)
Jan
2012-4-3
This is a question for the technical support, because the source codes of textscan are not public.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Text Data Preparation 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!