Commit 6210444c authored by John Esmet's avatar John Esmet

fixes #130 Create basement nodes and non-leaf message trees using

create_no_array() so that deserialization does not malloc/free needlessly.
parent 659f0762
...@@ -105,7 +105,7 @@ void bn_data::init_zero() { ...@@ -105,7 +105,7 @@ void bn_data::init_zero() {
void bn_data::initialize_empty() { void bn_data::initialize_empty() {
toku_mempool_zero(&m_buffer_mempool); toku_mempool_zero(&m_buffer_mempool);
m_buffer.create(); m_buffer.create_no_array();
} }
void bn_data::initialize_from_data(uint32_t num_entries, unsigned char *buf, uint32_t data_size) { void bn_data::initialize_from_data(uint32_t num_entries, unsigned char *buf, uint32_t data_size) {
......
...@@ -1171,9 +1171,9 @@ BASEMENTNODE toku_create_empty_bn_no_buffer(void) { ...@@ -1171,9 +1171,9 @@ BASEMENTNODE toku_create_empty_bn_no_buffer(void) {
NONLEAF_CHILDINFO toku_create_empty_nl(void) { NONLEAF_CHILDINFO toku_create_empty_nl(void) {
NONLEAF_CHILDINFO XMALLOC(cn); NONLEAF_CHILDINFO XMALLOC(cn);
int r = toku_fifo_create(&cn->buffer); assert_zero(r); int r = toku_fifo_create(&cn->buffer); assert_zero(r);
cn->fresh_message_tree.create(); cn->fresh_message_tree.create_no_array();
cn->stale_message_tree.create(); cn->stale_message_tree.create_no_array();
cn->broadcast_list.create(); cn->broadcast_list.create_no_array();
memset(cn->flow, 0, sizeof cn->flow); memset(cn->flow, 0, sizeof cn->flow);
return cn; return cn;
} }
......
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