开发者

ksh: is it safe to concatenate a really long string

开发者 https://www.devze.com 2023-03-19 19:59 出处:网络
I have a very large data file (2GB-3GB). I need to parse some data out of it and check if there is a duplication. So I have a empty string to start with, so data that I parse out from input file, will

I have a very large data file (2GB-3GB). I need to parse some data out of it and check if there is a duplication. So I have a empty string to start with, so data that I parse out from input file, will be check against this string. If it is 开发者_JAVA百科not already there, append it. This string can potential be very very long. Is it dangerous?


It is not dangerous. You just might have not enough memory to store a very very long string. So will encounter out of memory error.

0

精彩评论

暂无评论...
验证码 换一张
取 消