diff --git a/README.md b/README.md index 263cd0f7..047b8271 100644 --- a/README.md +++ b/README.md @@ -365,6 +365,10 @@ methods, here are some links: ## Version history## +### version 2.2.1 ### + +**swarm** 2.2.1 fixes a memory allocation bug for d=1. + ### version 2.2.0 ### **swarm** 2.2.0 fixes several problems and improves usability. diff --git a/man/swarm.1 b/man/swarm.1 index 150b7049..a5114549 100644 --- a/man/swarm.1 +++ b/man/swarm.1 @@ -1,5 +1,5 @@ .\" ============================================================================ -.TH swarm 1 "October 17, 2017" "version 2.2.0" "USER COMMANDS" +.TH swarm 1 "October 27, 2017" "version 2.2.1" "USER COMMANDS" .\" ============================================================================ .SH NAME swarm \(em find clusters of nearly-identical nucleotide amplicons @@ -389,6 +389,9 @@ New features and important modifications of \fBswarm\fR (short lived or minor bug releases are not mentioned): .RS .TP +.BR v2.2.1\~ "released October 27, 2017" +Version 2.2.1 fixes a memory allocation bug for d=1. +.TP .BR v2.2.0\~ "released October 17, 2017" Version 2.2.0 fixes several problems and improves usability. Corrected output to structure and uclust files when using fastidious diff --git a/man/swarm_manual.pdf b/man/swarm_manual.pdf index 79308527..0d5392a1 100644 Binary files a/man/swarm_manual.pdf and b/man/swarm_manual.pdf differ diff --git a/src/algod1.cc b/src/algod1.cc index 4971df32..728059a3 100644 --- a/src/algod1.cc +++ b/src/algod1.cc @@ -491,7 +491,8 @@ void process_seed(int subseed) { if (global_hits_count + ti[t].hits_count > global_hits_alloc) { - global_hits_alloc <<= 1; + while (global_hits_count + ti[t].hits_count > global_hits_alloc) + global_hits_alloc <<= 1; global_hits_data = (int*)xrealloc(global_hits_data, global_hits_alloc * sizeof(int)); } diff --git a/src/swarm.h b/src/swarm.h index 82cdffcb..7b831739 100644 --- a/src/swarm.h +++ b/src/swarm.h @@ -54,7 +54,7 @@ #define LINE_MAX 2048 #endif -#define SWARM_VERSION "2.2.0" +#define SWARM_VERSION "2.2.1" #define WIDTH 32 #define WIDTH_SHIFT 5 #define BLOCKWIDTH 32