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
#include <memory> | |
#include <cstddef> | |
#include <type_traits> | |
template<typename Allocator> | |
class tracking_allocator | |
{ | |
private: | |
template <typename> | |
friend class tracking_allocator; |
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
#pragma once | |
#include <iostream> | |
#include <string> | |
#include <list> | |
#include <iterator> | |
#include <type_traits> | |
#include <algorithm> | |
/* This is a small & simple example |
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
#ifndef SPLITMIX_HPP_INCLUDED | |
#define SPLITMIX_HPP_INCLUDED 1 | |
/* | |
* A C++ implementation of SplitMix | |
* Original design by Guy L. Steele, Jr., Doug Lea and Christine H. Flood | |
* Described in _Fast splittable pseudorandom number generators_ | |
* http://dx.doi.org/10.1145/2714064.2660195 and implemented in | |
* Java 8 as SplittableRandom | |
* Based on code from the original paper, with revisions based on changes |
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
/** | |
* @file memory_tracking.cpp | |
* Implements simple memory tracking for use in C++ applications. Define | |
* TRACK_MEMORY to enable during debug and unit testing, and undef for | |
* production. | |
* Version 1.01 | |
* | |
* Copyright (c) Josh Carter <josh@multipart-mixed.com>, 2006 | |
* All rights reserved. | |
* |
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
/** | |
* @file endianness.h | |
* @brief Convert Endianness of shorts, longs, long longs, regardless of architecture/OS | |
* | |
* Defines (without pulling in platform-specific network include headers): | |
* bswap16, bswap32, bswap64, ntoh16, hton16, ntoh32 hton32, ntoh64, hton64 | |
* | |
* Should support linux / macos / solaris / windows. | |
* Supports GCC (on any platform, including embedded), MSVC2015, and clang, | |
* and should support intel, solaris, and ibm compilers as well. |
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
#ifndef __ERASE_FROM_MEMORY_H__ | |
#define __ERASE_FROM_MEMORY_H__ 1 | |
#define __STDC_WANT_LIB_EXT1__ 1 | |
#include <stdlib.h> | |
#include <string.h> | |
void *erase_from_memory(void *pointer, size_t size_data, size_t size_to_remove) { | |
#ifdef __STDC_LIB_EXT1__ | |
memset_s(pointer, size_data, 0, size_to_remove); |
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
wget -c --no-cookies --no-check-certificate --header "Cookie: oraclelicense=accept-securebackup-cookie" https://download.oracle.com/otn-pub/java/jdk/12.0.2+10/e482c34c86bd4bf8b56c0b35558996b9/jdk-12.0.2_linux-x64_bin.tar.gz |
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
// Serialize.hpp | |
// 简易的C++二进制序列化类,模仿boost::serialization | |
// 邱超凡 2016.9.9 | |
#ifndef CPP_SERIALIZE_HPP | |
#define CPP_SERIALIZE_HPP | |
#include <fstream> | |
#include <algorithm> | |
#include <type_traits> |
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
/* | |
* Random-Number Utilities (randutil) | |
* Addresses common issues with C++11 random number generation. | |
* Makes good seeding easier, and makes using RNGs easy while retaining | |
* all the power. | |
* | |
* The MIT License (MIT) | |
* | |
* Copyright (c) 2015-2022 Melissa E. O'Neill | |
* |
NewerOlder