Пример #1
0
boost::shared_ptr<boost::pool<voltdb_pool_allocator_new_delete> > ThreadLocalPool::get(std::size_t size) {
    size_t alloc_size = getAllocationSizeForObject(size);
    if (alloc_size == 0)
    {
        throwFatalException("Attempted to allocate an object then the 1 meg limit. Requested size was %Zu", size);
    }
    return getExact(alloc_size);
}
Пример #2
0
boost::shared_ptr<boost::pool<voltdb_pool_allocator_new_delete> > ThreadLocalPool::get(std::size_t size) {
    size_t alloc_size = getAllocationSizeForObject(size);
    if (alloc_size == 0)
    {
        throwDynamicSQLException("Attempted to allocate an object > than the 1 meg limit. Requested size was %du",
            static_cast<int32_t>(size));
    }
    return getExact(alloc_size);
}
Пример #3
0
 void getT(X &x) { getExact(&x, sizeof(X)); }