Changeset View
Changeset View
Standalone View
Standalone View
src/test/allocator_tests.cpp
// Copyright (c) 2012-2016 The Bitcoin Core developers | // Copyright (c) 2012-2016 The Bitcoin Core developers | ||||
// Distributed under the MIT software license, see the accompanying | // Distributed under the MIT software license, see the accompanying | ||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php. | // file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||||
#include <support/allocators/secure.h> | #include <support/allocators/secure.h> | ||||
#include <util/system.h> | #include <util/system.h> | ||||
#include <test/test_bitcoin.h> | #include <test/test_bitcoin.h> | ||||
#include <boost/test/unit_test.hpp> | #include <boost/test/unit_test.hpp> | ||||
#include <memory> | |||||
BOOST_FIXTURE_TEST_SUITE(allocator_tests, BasicTestingSetup) | BOOST_FIXTURE_TEST_SUITE(allocator_tests, BasicTestingSetup) | ||||
BOOST_AUTO_TEST_CASE(arena_tests) { | BOOST_AUTO_TEST_CASE(arena_tests) { | ||||
// Fake memory base address for testing | // Fake memory base address for testing | ||||
// without actually using memory. | // without actually using memory. | ||||
void *synth_base = reinterpret_cast<void *>(0x08000000); | void *synth_base = reinterpret_cast<void *>(0x08000000); | ||||
const size_t synth_size = 1024 * 1024; | const size_t synth_size = 1024 * 1024; | ||||
Arena b(synth_base, synth_size, 16); | Arena b(synth_base, synth_size, 16); | ||||
▲ Show 20 Lines • Show All 213 Lines • Show Last 20 Lines |