Skip to content

Commit

Permalink
reduce pack size and pack limit to avoid possible huge memory usage
Browse files Browse the repository at this point in the history
  • Loading branch information
sfchen committed Nov 7, 2024
1 parent cb258dd commit 017622a
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,20 +29,15 @@ const char ATCG_BASES[] = {'A', 'T', 'C', 'G'};

#pragma pack()

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

// how many reads one pack has
static const int PACK_SIZE = 1000;
static const int PACK_SIZE = 256;

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

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

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

0 comments on commit 017622a

Please sign in to comment.