From: martinahansen Date: Tue, 26 Aug 2008 01:55:37 +0000 (+0000) Subject: made speedup for repeat-O-matic X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;ds=sidebyside;h=8976fde6c183877d4bb984d213108d01f0e6f612;p=biopieces.git made speedup for repeat-O-matic git-svn-id: http://biopieces.googlecode.com/svn/trunk@225 74ccb610-7750-0410-82ae-013aeee3265d --- diff --git a/code_c/Maasha/src/gmon.out b/code_c/Maasha/src/gmon.out deleted file mode 100644 index 6ef1c72..0000000 Binary files a/code_c/Maasha/src/gmon.out and /dev/null differ diff --git a/code_c/Maasha/src/repeat-O-matic.c b/code_c/Maasha/src/repeat-O-matic.c index 7dc3996..cf9bbfd 100644 --- a/code_c/Maasha/src/repeat-O-matic.c +++ b/code_c/Maasha/src/repeat-O-matic.c @@ -267,8 +267,6 @@ void oligo_count_output( char *path, uint *array, uint nmer, uint mask, bool log if ( block_pos == 0 ) { - memset( block, '\0', block_size ); - block_beg = chr_pos; block[ block_pos ] = count; @@ -282,6 +280,8 @@ void oligo_count_output( char *path, uint *array, uint nmer, uint mask, bool log fixedstep_put_entry( entry->seq_name, block_beg, 1, block, block_pos, log10_flag ); block_pos = 0; + + memset( block, '\0', block_pos ); } else { @@ -298,7 +298,8 @@ void oligo_count_output( char *path, uint *array, uint nmer, uint mask, bool log { fixedstep_put_entry( entry->seq_name, block_beg, 1, block, block_pos, log10_flag ); - mem_free( ( void * ) &block ); + free( block ); + block = NULL; } fprintf( stderr, "done.\n" );