1 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
2 // vim: ts=8 sw=2 smarttab
5 #include "StupidAllocator.h"
6 #include "BitMapAllocator.h"
7 #include "common/debug.h"
9 #define dout_subsys ceph_subsys_bluestore
11 Allocator *Allocator::create(CephContext* cct, string type,
12 int64_t size, int64_t block_size)
14 if (type == "stupid") {
15 return new StupidAllocator(cct);
16 } else if (type == "bitmap") {
17 return new BitMapAllocator(cct, size, block_size);
19 lderr(cct) << "Allocator::" << __func__ << " unknown alloc type "