Skip to content

Commit 017622a

Browse files
committed
reduce pack size and pack limit to avoid possible huge memory usage
1 parent cb258dd commit 017622a

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

Diff for: src/common.h

+2-7
Original file line numberDiff line numberDiff line change
@@ -29,20 +29,15 @@ const char ATCG_BASES[] = {'A', 'T', 'C', 'G'};
2929

3030
#pragma pack()
3131

32-
// the limit of the queue to store the packs
33-
// error may happen if it generates more packs than this number
34-
static const int PACK_NUM_LIMIT = 10000000;
3532

3633
// how many reads one pack has
37-
static const int PACK_SIZE = 1000;
34+
static const int PACK_SIZE = 256;
3835

3936
// if one pack is produced, but not consumed, it will be kept in the memory
4037
// this number limit the number of in memory packs
4138
// if the number of in memory packs is full, the producer thread should sleep
42-
static const int PACK_IN_MEM_LIMIT = 500;
39+
static const int PACK_IN_MEM_LIMIT = 128;
4340

44-
// if read number is more than this, warn it
45-
static const int WARN_STANDALONE_READ_LIMIT = 10000;
4641

4742
// different filtering results, bigger number means worse
4843
// if r1 and r2 are both failed, then the bigger one of the two results will be recorded

0 commit comments

Comments
 (0)