Ejemplo n.º 1
0
 AllocatorBlock allocate(size_t n) {
     if (n == s && root_) {
         AllocatorBlock b = { root_, n };
         root_ = root_->next;
         return b;
     } else {
         return parent_.allocate(n);
     }
 }
Ejemplo n.º 2
0
 vector_base(const A& a, typename A::size_type n) : alloc(a), v(alloc.allocate(n)), space(v+n), last(v+n) { }
Ejemplo n.º 3
0
 bsend_buffer(int size, A alloc) : size(size), alloc(alloc), buff(alloc.allocate(size)) {
   environment::buffer_attach(buff, size);
 }