forked from cppalliance/NuDB
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Dynamic block size for custom allocator (API change):
This changes the internal arena allocator to dynamically adjust the block size based on the allocation throughput. It removes the requirement that callers specify the alloc size. Public interfaces that previously required an allocation size hint, now no longer require the hint. It is sufficient to simply delete the parameter from call sites.
- Loading branch information
1 parent
506980e
commit 517510a
Showing
7 changed files
with
188 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// | ||
// Copyright (c) 2015-2016 Vinnie Falco (vinnie dot falco at gmail dot com) | ||
// | ||
// Distributed under the Boost Software License, Version 1.0. (See accompanying | ||
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) | ||
// | ||
|
||
#ifndef NUDB_DETAIL_MUTEX_HPP | ||
#define NUDB_DETAIL_MUTEX_HPP | ||
|
||
#include <boost/thread/lock_types.hpp> | ||
#include <boost/thread/shared_mutex.hpp> | ||
|
||
namespace nudb { | ||
namespace detail { | ||
|
||
using shared_lock_type = | ||
boost::shared_lock<boost::shared_mutex>; | ||
|
||
using unique_lock_type = | ||
boost::unique_lock<boost::shared_mutex>; | ||
|
||
} // detail | ||
} // nudb | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.