Changeset 516


Ignore:
Timestamp:
Jul 16, 2010, 11:34:49 AM (9 years ago)
Author:
cameron
Message:

Stack-allocated buffer replaces heap-allocated buffer.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • proto/parabix2/template.c

    r494 r516  
    100100  int errpos = 0;
    101101  int chars_read = 0;
    102   char * srcbuf;
    103 
    104  
    105   srcbuf = (char *) malloc(BUFFER_SIZE+BLOCK_SIZE);
    106   if(!srcbuf){
    107     printf("Can't allocate srcbuf!\n");
    108     exit(-1);
    109   }
     102  char srcbuf[BUFFER_SIZE+BLOCK_SIZE];
    110103 
    111104  EOF_mask = simd_const_1(1);
     
    207200    block_pos = 0;
    208201  }
    209   free((void*)srcbuf);
    210202}
    211203
Note: See TracChangeset for help on using the changeset viewer.