24 lines
599 B
C++
Raw Normal View History

2013-04-26 15:55:45 +01:00
#include "test_utils.h"
2013-05-01 16:33:24 +01:00
#include "persistent-data/space-maps/core.h"
2013-05-28 13:48:10 +01:00
using namespace persistent_data;
2013-04-26 15:55:45 +01:00
//----------------------------------------------------------------
void test::zero_block(block_manager<>::ptr bm, block_address b)
{
block_manager<>::write_ref wr = bm->write_lock(b);
2014-07-29 11:34:26 +01:00
memset(wr.data(), 0, 4096);
2013-04-26 15:55:45 +01:00
}
2013-05-28 13:48:10 +01:00
transaction_manager::ptr
test::open_temporary_tm(block_manager<>::ptr bm)
2013-05-01 16:33:24 +01:00
{
space_map::ptr sm(new core_map(bm->get_nr_blocks()));
transaction_manager::ptr tm(new transaction_manager(bm, sm));
return tm;
}
2013-04-26 15:55:45 +01:00
//----------------------------------------------------------------