Boost logo

Boost Users :

From: Seweryn Habdank-Wojewódzki (habdank_at_[hidden])
Date: 2007-03-27 21:07:10


Hi!

Below if small code for testing of pool_allocator. The program below is
working quite good. But if I change 10`000 to 100`000 or more then program
never ending.

Regards.

#include <list>
#include <iostream>
#include <algorithm>
#include <iterator>
#include <boost/pool/pool_alloc.hpp>

int main()
{
    using namespace std;
    //print_list(std::cout,primes::PrimesLE(10000000));
    list<int,boost::pool_allocator<int> > p;
    for ( int i = 0; i < 10000; ++i )
        p.push_back(i);
    //copy ( p.begin(), p.end(), ostream_iterator<int>(cout,"\n") );
    //boost::singleton_pool<boost::pool_allocator_tag,
sizeof(int)>::release_memory();
}

-- 
|\/\/|   Seweryn Habdank-Wojewódzki
 \/\/

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net