Skip to content

Commit

Permalink
Corrected benchmark buffer size
Browse files Browse the repository at this point in the history
  • Loading branch information
g1mv committed Jun 20, 2015
1 parent f015f5a commit d0a32cf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions benchmark/src/benchmark.c
Expand Up @@ -169,7 +169,7 @@ int main(int argc, char *argv[]) {
const uint_fast64_t compressed_size = result.bytesWritten;

if (!compression_only) {
result = density_buffer_decompress(out, compressed_size, in, uncompressed_size, NULL, NULL);
result = density_buffer_decompress(out, compressed_size, in, memory_allocated, NULL, NULL);
if (result.state) {
DENSITY_BENCHMARK_ERROR(printf("Buffer API returned error %i (%s).", result.state, density_benchmark_convert_buffer_state_to_text(result.state)), true);
}
Expand Down Expand Up @@ -220,12 +220,12 @@ int main(int argc, char *argv[]) {
++iterations;

cputime_chronometer_start(&chrono);
result = density_buffer_compress(in, uncompressed_size, out, compressed_size, compression_mode, block_type, NULL, NULL);
result = density_buffer_compress(in, uncompressed_size, out, memory_allocated, compression_mode, block_type, NULL, NULL);
compress_time_elapsed = cputime_chronometer_stop(&chrono);

if (!compression_only) {
cputime_chronometer_start(&chrono);
result = density_buffer_decompress(out, compressed_size, in, uncompressed_size, NULL, NULL);
result = density_buffer_decompress(out, compressed_size, in, memory_allocated, NULL, NULL);
decompress_time_elapsed = cputime_chronometer_stop(&chrono);
}

Expand Down

0 comments on commit d0a32cf

Please sign in to comment.