Skip to content
Browse files

use CALLOC instead of MALLOC

  • Loading branch information...
1 parent 5ef91ed commit b1edffbca7d091e3d51d9eaa6a11d902c40fdab5 @sonney2k sonney2k committed Sep 11, 2011
Showing with 6 additions and 6 deletions.
  1. +6 −6 src/shogun/kernel/LocalAlignmentStringKernel.cpp
View
12 src/shogun/kernel/LocalAlignmentStringKernel.cpp
@@ -237,11 +237,11 @@ float64_t CLocalAlignmentStringKernel::LAkernelcompute(
/* Each array stores two successive columns of the (nX+1)x(nY+1) table used in dynamic programming */
cl = nY+1; /* each column stores the positions in the aaY sequence, plus a position at zero */
- logM=SG_MALLOC(int32_t, 2*cl);
- logX=SG_MALLOC(int32_t, 2*cl);
- logY=SG_MALLOC(int32_t, 2*cl);
- logX2=SG_MALLOC(int32_t, 2*cl);
- logY2=SG_MALLOC(int32_t, 2*cl);
+ logM=SG_CALLOC(int32_t, 2*cl);
+ logX=SG_CALLOC(int32_t, 2*cl);
+ logY=SG_CALLOC(int32_t, 2*cl);
+ logX2=SG_CALLOC(int32_t, 2*cl);
+ logY2=SG_CALLOC(int32_t, 2*cl);
/************************************************/
/* First iteration : initialization of column 0 */
@@ -412,7 +412,7 @@ void CLocalAlignmentStringKernel::init()
m_opening = 10;
m_extension = 2;
- scaled_blosum=SG_MALLOC(int32_t, sizeof(blosum));
+ scaled_blosum=SG_CALLOC(int32_t, sizeof(blosum));
init_logsum();
m_parameters->add(&initialized, "initialized", "if kernel is initalized");

0 comments on commit b1edffb

Please sign in to comment.
Something went wrong with that request. Please try again.