--- src/include/fst/memory.h +++ src/include/fst/memory.h @@ -237,11 +237,11 @@ explicit BlockAllocator(const BlockAllocator &arena_alloc) : arenas_(arena_alloc.Arenas()) {} - T *allocate(size_type n, const void *hint = nullptr) { + T *allocate(size_type n) { if (n * kAllocFit <= kAllocSize) { return static_cast(Arena()->Allocate(n)); } else { - return Allocator().allocate(n, hint); + return Allocator().allocate(n); } } @@ -291,7 +291,7 @@ explicit PoolAllocator(const PoolAllocator &pool_alloc) : pools_(pool_alloc.Pools()) {} - T *allocate(size_type n, const void *hint = nullptr) { + T *allocate(size_type n) { if (n == 1) { return static_cast(Pool<1>()->Allocate()); } else if (n == 2) { @@ -307,7 +307,7 @@ } else if (n <= 64) { return static_cast(Pool<64>()->Allocate()); } else { - return Allocator().allocate(n, hint); + return Allocator().allocate(n); } }