Various updates

This commit is contained in:
Duke Leto
2020-12-08 14:37:58 -05:00
parent fc5c773d66
commit 4fd9ae6f94
6 changed files with 28 additions and 35 deletions

View File

@@ -8,13 +8,9 @@
#define HUSH_SUPPORT_ALLOCATORS_SECURE_H
#include "support/pagelocker.h"
#include <string>
//
// Allocator that locks its contents from being paged
// out of memory and clears its contents before deletion.
//
template <typename T>
struct secure_allocator : public std::allocator<T> {
// MSVC8 default copy constructor is broken

View File

@@ -1,13 +1,13 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2013 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// Copyright (c) 2019-2020 The Hush developers
// Distributed under the GPLv3 software license, see the accompanying
// file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html
#ifndef BITCOIN_SUPPORT_ALLOCATORS_ZEROAFTERFREE_H
#define BITCOIN_SUPPORT_ALLOCATORS_ZEROAFTERFREE_H
#ifndef HUSH_SUPPORT_ALLOCATORS_ZEROAFTERFREE_H
#define HUSH_SUPPORT_ALLOCATORS_ZEROAFTERFREE_H
#include "support/cleanse.h"
#include <memory>
#include <vector>
@@ -45,4 +45,4 @@ struct zero_after_free_allocator : public std::allocator<T> {
// Byte-vector that clears its contents before deletion.
typedef std::vector<char, zero_after_free_allocator<char> > CSerializeData;
#endif // BITCOIN_SUPPORT_ALLOCATORS_ZEROAFTERFREE_H
#endif // HUSH_SUPPORT_ALLOCATORS_ZEROAFTERFREE_H