pelican/utility/ContiguousMemory.hpp
// reserve a contiguous memory buffer for the specified number
// of objects
reserve a contiguous memory buffer for the specified number
of objects
reserve a contiguous memory buffer for the specified number of objects
ContiguousMemory( unsigned long num ) : _size(num) {
            std::pair<T*,unsigned long> r = std::get_temporary_buffer<T>(num);
            if( r.second != num ) throw(QString("ContiguousMemory: unable to allocate num objects"));
            _buf = r.first;
            for(unsigned int i=0; i<_size; ++i ) {
                _free.append(i);
            }
        }
ContiguousMemory ( unsigned long num ) : _size ( num ) { std :: pair < T * , unsigned long > r = std :: get_temporary_buffer < T > ( num ) ; if ( r . second != num ) throw ( QString ( " " ) ) ; _buf = r . first ; for ( unsigned int i = 0 ; i < _size ; ++ i ) { _free . append ( i ) ; } }
reserve a contiguous memory buffer for the specified number
of objects
reserve a contiguous memory buffer for the specified number of objects
// allocate the memory // mark all slots as free