由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Programming版 - Big # of files output problem in C
相关主题
Help -- How to output error messages to a file for scripts called by system calls???error of opening a file located in a remote server from pyt (转载)
a question of perlPython:请问如何把list变成structured array。
a simple question[转载] CS Algorithm Interview question
MatLab Codesize不固定的struct怎么定义呀?
C -> assemblyhow to use array to simulate multi loops
A question about sharing data inside a C++ class[转载] 简单的题都不敢做了.
请教改numpy array的dtype何谓 heap array?
How to compile multiple c files into one obj file?C# 的不定长度的ARRAY?
相关话题的讨论汇总
话题: files话题: output话题: big话题: problem话题: program
进入Programming版参与讨论
1 (共1页)
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.

1 (共1页)
进入Programming版参与讨论
相关主题
C# 的不定长度的ARRAY?C -> assembly
perl array|hash questionA question about sharing data inside a C++ class
C++ OO approach to use multi-dim array for HPC请教改numpy array的dtype
这道题有什么好思路?How to compile multiple c files into one obj file?
Help -- How to output error messages to a file for scripts called by system calls???error of opening a file located in a remote server from pyt (转载)
a question of perlPython:请问如何把list变成structured array。
a simple question[转载] CS Algorithm Interview question
MatLab Codesize不固定的struct怎么定义呀?
相关话题的讨论汇总
话题: files话题: output话题: big话题: problem话题: program