n********a 发帖数: 119 | 1 Let's say there are 10k files need to be output in one C program.
It seems that I can't do that, the program stops after output like 1k files.
If I run the program on different PCs, the stop points are different on each
PC.
Probably that's b/c of memory problem, but I'm not sure about it
and how to solve it.
Any suggestion? | c********e 发帖数: 383 | 2 did you close those which are finished?
there are upper limits on the number of filedescriptors that you can open.
【在 n********a 的大作中提到】 : Let's say there are 10k files need to be output in one C program. : It seems that I can't do that, the program stops after output like 1k files. : If I run the program on different PCs, the stop points are different on each : PC. : Probably that's b/c of memory problem, but I'm not sure about it : and how to solve it. : Any suggestion?
| n********a 发帖数: 119 | 3 That's exactly what happened.
I always close files and free those dynamic arrays, but somehow forgot to
close
files in this code. And I never thought about it. :(
Thx lah
【在 c********e 的大作中提到】 : did you close those which are finished? : there are upper limits on the number of filedescriptors that you can open.
|
|