Commit b44d7ca7 authored by John Esmet's avatar John Esmet

Merge branch 'bugs/70'

parents 8745377a a7a2df13
...@@ -90,6 +90,10 @@ PATENT RIGHTS GRANT: ...@@ -90,6 +90,10 @@ PATENT RIGHTS GRANT:
#include "test.h" #include "test.h"
#include <string.h>
#include <toku_include/memory.h>
#include <locktree/range_buffer.h> #include <locktree/range_buffer.h>
namespace toku { namespace toku {
...@@ -215,8 +219,8 @@ static void test_small_and_large_points(void) { ...@@ -215,8 +219,8 @@ static void test_small_and_large_points(void) {
// a subsequent large append. // a subsequent large append.
const size_t small_size = 32; const size_t small_size = 32;
const size_t large_size = 16 * 1024; const size_t large_size = 16 * 1024;
char *small_buf = toku_xmalloc(small_size); char *small_buf = (char *) toku_xmalloc(small_size);
char *large_buf = toku_xmalloc(large_size); char *large_buf = (char *) toku_xmalloc(large_size);
DBT small_dbt, large_dbt; DBT small_dbt, large_dbt;
memset(&small_dbt, 0, sizeof(DBT)); memset(&small_dbt, 0, sizeof(DBT));
memset(&large_dbt, 0, sizeof(DBT)); memset(&large_dbt, 0, sizeof(DBT));
...@@ -229,7 +233,7 @@ static void test_small_and_large_points(void) { ...@@ -229,7 +233,7 @@ static void test_small_and_large_points(void) {
buffer.append(&small_dbt, &small_dbt); buffer.append(&small_dbt, &small_dbt);
invariant(buffer.m_buf_size >= small_dbt.size); invariant(buffer.m_buf_size >= small_dbt.size);
// Append a large dbt, the buf should be able to fit it. // Append a large dbt, the buf should be able to fit it.
buffer.append(&small_dbt, &small_dbt); buffer.append(&large_dbt, &large_dbt);
invariant(buffer.m_buf_size >= (small_dbt.size + large_dbt.size)); invariant(buffer.m_buf_size >= (small_dbt.size + large_dbt.size));
toku_free(small_buf); toku_free(small_buf);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment