![]() |
Home | Libraries | People | FAQ | More |
boost::interprocess::rbtree_best_fit
// In header: <boost/interprocess/mem_algo/rbtree_best_fit.hpp> template<typename MutexFamily, typename VoidPointer, MemAlignment> class rbtree_best_fit { public: // types typedef ; // Shared mutex family used for the rest of the Interprocess framework. typedef ; // Pointer type to be used with the rest of the Interprocess framework. typedef ; typedef ; typedef ; // construct/copy/destruct (, ); ~(); // public member functions (); (); () ; () ; (); (); (); (); (); template<typename T> (, , , ); (, , , , = ); () ; (, ); // public static functions (); // public data members static PayloadPerAllocation; };
This class implements an algorithm that stores the free nodes in a red-black tree to have logarithmic search/insert times.
rbtree_best_fit
public member functions( nbytes);Allocates bytes, returns 0 if there is not more memory.
( addr);Deallocates previously allocated bytes.
() ;Returns the size of the memory segment.
() ;Returns the number of free bytes of the segment.
();
Initializes to zero all the memory that's not in use. This function is normally used for security reasons.
( extra_size);
Increases managed memory in extra_size bytes more
();Decreases managed memory as much as possible.
();Returns true if all allocated memory has been deallocated.
();
Makes an internal sanity check and returns true if success
template<typename T> ( command, limit_size, prefer_in_recvd_out_size, reuse);
( command, limit_object, prefer_in_recvd_out_size, reuse_ptr, sizeof_object = );
( ptr) ;Returns the size of the buffer previously allocated pointed by ptr.
( nbytes, alignment);
Allocates aligned bytes, returns 0 if there is not more memory. Alignment must be power of 2