Home / Open source / Terimber 2.0
byte_allocator Class Referencehigh performance class for allocation
More...
#include <memory.h>
List of all members.
Detailed Description
high performance class for allocation
Definition at line 59 of file memory.h.
Constructor & Destructor Documentation
BEGIN_TERIMBER_NAMESPACE byte_allocator::byte_allocator |
( |
size_t |
capacity = os_def_size |
) |
|
constructor
- Parameters:
-
Definition at line 34 of file memory.cpp.
byte_allocator::~byte_allocator |
( |
|
) |
|
Member Function Documentation
void byte_allocator::clear_all |
( |
bool |
secure = false |
) |
|
clears all memory
- Parameters:
-
secure |
rewrite memory before release |
Reimplemented in rep_allocator.
Definition at line 123 of file memory.cpp.
References mem_chunk::_chunk_size, _count, mem_chunk::_mem, mem_chunk::_next_chunk, _start_chunk, _using_chunk, and reset().
Referenced by rep_allocator::clear_all(), byte_allocator_creator::deactivate(), cluster_engine_impl::do_clustering(), memtable::uninit(), and ~byte_allocator().
void byte_allocator::clear_extra |
( |
bool |
secure = false |
) |
|
clears only extra chunks
- Parameters:
-
secure |
rewrite memory before release |
Reimplemented in rep_allocator.
Definition at line 99 of file memory.cpp.
References mem_chunk::_chunk_size, _count, mem_chunk::_mem, mem_chunk::_next_chunk, _start_chunk, _using_chunk, and reset().
Referenced by byte_allocator_creator::back(), xml_grammar::clear(), xml_document::clear(), rep_allocator::clear_extra(), byte_backet< N, M >::reset(), orcl_dbserver::v_disconnect(), odbc_dbserver::v_disconnect(), and mysql_dbserver::v_disconnect().
void byte_allocator::reset |
( |
bool |
secure = false |
) |
[inline] |
resets allocator for reusing the memory again
- Parameters:
-
secure |
rewrite memory before release |
Reimplemented in rep_allocator.
Definition at line 91 of file memory.hpp.
References mem_chunk::_chunk_size, _free_pos, mem_chunk::_mem, mem_chunk::_next_chunk, _start_chunk, and _using_chunk.
Referenced by byte_allocator_creator::back(), clear_all(), clear_extra(), variant_factory::clone(), dbserver_impl::close_sql(), memlookup::construct(), cluster_processor< T, N >::cut(), var_object_repository::delete_object(), msg_communicator::destroy_msg(), dbserver_impl::fetch_data(), dbserver_impl::get_param_as_value(), xml_designer_impl::get_value(), memlookup::get_value_as_value(), terimber_db_value_vector_impl::get_value_as_value(), dbserver_impl::get_value_as_value(), xml_designer_impl::get_xpath(), fuzzy_matcher_impl::match(), dbserver_impl::param_bulk_remove(), dbserver_impl::param_bulk_remove_all(), xml_processor::parse(), xml_processor::parseElement(), xml_processor::parseEndTag(), xml_processor::parseMisc(), xml_processor::parseProlog(), xml_processor::parseStartTag(), dtd_processor::parseSubSet(), xml_persistor::persist(), xml_persistor::persistAttributes(), mst< T, N >::pfs(), variant_factory::reset(), string_backet< N, M >::reset(), rep_allocator::reset(), byte_manager::reset_all_tmp(), byte_source::reset_buffer(), xml_persistor::restore_stack(), and xml_designer_impl::select_xpath().
void * byte_allocator::allocate |
( |
size_t |
size |
) |
[inline] |
allocates required array of bytes
- Parameters:
-
Reimplemented in array_allocator< T >, array_allocator< terimber_index_column_info_ex >, array_allocator< var_object_map_t::mainmap_iter_t >, and array_allocator< binder >.
Definition at line 109 of file memory.hpp.
References mem_chunk::_chunk_size, _free_pos, mem_chunk::_mem, _using_chunk, ALIGNED_SIZEOF, and next_chunk().
Referenced by _stack< T, A >::_buynode(), _map< K, T, A, Pr, M >::_buynode(), _list< T, A >::_buynode(), _vector< T, A >::_buynodes(), base_string< T >::_create(), fuzzy_matcher_impl::_match(), paged_buffer::_persist(), fuzzy_matcher_impl::add(), xml_document::add_attribute(), xml_document::add_cdata(), xml_document::add_comment(), xml_document::add_element(), xml_document::add_element_desc(), xml_document::add_entity_desc(), xml_document::add_notation_desc(), xml_document::add_pi(), xml_document::add_text(), string_backet< N, M >::allocate(), array_allocator< T >::allocate(), node_allocator< T >::allocate(), byte_backet< N, M >::allocate(), dfa_token::assign(), _bitset::assign(), xml_document::assign_attribute_value(), backet_tank< N >::backet_tank(), content_children::build_children_tree(), content_children::build_dfa(), byte_consumer::byte_consumer(), byte_source::byte_source(), byte_tank< N >::byte_tank(), var_object_repository::cast_to_common_type(), dtd_processor::checkRepeation(), msg_cpp::construct(), fuzzyphonetic::convert_to_metaphone(), fuzzyphonetic::convert_to_reflection(), xml_grammar::copy(), copy_db_row(), copy_string(), copy_value(), dbserver_impl::get_param_as_numeric(), memlookup::get_value_as_numeric(), terimber_db_value_vector_impl::get_value_as_numeric(), dbserver_impl::get_value_as_numeric(), xml_designer_impl::get_xpath(), buffer_loader::load(), fuzzy_matcher_impl::make_string_lower(), fuzzyphonetic::metaphone_distance(), str_template::multibyte_to_unicode(), paged_buffer::paged_buffer(), parse_value(), dtd_processor::parseChildren(), dtd_processor::parseMixed(), fuzzy_matcher_impl::partial_intersect(), persist_value(), content_children::post_tree_build_init(), byte_source::push(), fuzzy_matcher_impl::reconstruct_string(), fuzzy_matcher_impl::remove(), room_array< T >::resize(), msg_cpp::resize(), _bitset::resize(), room_array< T >::room_array(), str_template::unicode_to_multibyte(), orcl_dbserver::v_bind_one_column(), odbc_dbserver::v_bind_one_column(), mysql_dbserver::v_bind_one_column(), orcl_dbserver::v_bind_one_param(), odbc_dbserver::v_bind_one_param(), mysql_dbserver::v_bind_one_param(), orcl_dbserver::v_convert_one_value(), odbc_dbserver::v_convert_one_value(), mysql_dbserver::v_convert_one_value(), odbc_dbserver::v_get_one_column_info(), orcl_dbserver::v_replace_quote(), odbc_dbserver::v_replace_quote(), mysql_dbserver::v_replace_quote(), and xml_document::validate_children().
void byte_allocator::deallocate |
( |
void * |
|
) |
[inline] |
size_t byte_allocator::capacity |
( |
|
) |
const [inline] |
size_t byte_allocator::count |
( |
|
) |
const [inline] |
void * byte_allocator::new_chunk |
( |
size_t |
size |
) |
[private] |
void * byte_allocator::next_chunk |
( |
size_t |
size |
) |
[private] |
Member Data Documentation
The documentation for this class was generated from the following files:
|
|