Migrated engine to using dlmalloc through eng::

This commit is contained in:
2022-02-24 02:17:41 -05:00
parent acc00289fb
commit f467944095
61 changed files with 631 additions and 590 deletions

View File

@@ -11,7 +11,7 @@ using deque = std::deque<T, EngAllocator<T>>;
namespace drv {
template<class T>
using deque = std::deque<T, std::allocator<T>>;
using deque = std::deque<T, DrvAllocator<T>>;
} // namespace drv
#endif // WRAP_DEQUE_HPP

View File

@@ -19,7 +19,7 @@ using less = std::less<T>;
template<class A, class B>
using pair = std::pair<A, B>;
template<class K, class V, class C=std::less<K>>
using map = std::map<K, V, C, std::allocator<std::pair<const K, V>>>;
using map = std::map<K, V, C, DrvAllocator<std::pair<const K, V>>>;
} // namespace drv
#endif // WRAP_MAP_HPP

View File

@@ -15,7 +15,7 @@ namespace drv {
template<class T>
using less = std::less<T>;
template<class K, class C=std::less<K>>
using set = std::set<K, C, std::allocator<K>>;
using set = std::set<K, C, DrvAllocator<K>>;
} // namespace drv
#endif // WRAP_SET_HPP

View File

@@ -7,13 +7,13 @@
namespace eng {
template<class C, class T=std::char_traits<C>>
using basic_ostringstream = std::basic_ostringstream<C, T, EngAllocator<C>>;
using ostringstream = std::basic_ostringstream<char>;
using ostringstream = basic_ostringstream<char>;
} // namespace eng
namespace drv {
template<class C, class T=std::char_traits<C>>
using basic_ostringstream = std::basic_ostringstream<C, T, std::allocator<C>>;
using ostringstream = std::basic_ostringstream<char>;
using basic_ostringstream = std::basic_ostringstream<C, T, DrvAllocator<C>>;
using ostringstream = basic_ostringstream<char>;
} // namespace drv
#endif // WRAP_SSTREAM_HPP

View File

@@ -12,7 +12,7 @@ using string = basic_string<char>;
namespace drv {
template<class C, class T=std::char_traits<C>>
using basic_string = std::basic_string<C, T, std::allocator<C>>;
using basic_string = std::basic_string<C, T, DrvAllocator<C>>;
using string = basic_string<char>;
} // namespace drv

View File

@@ -23,7 +23,7 @@ using equal_to = std::equal_to<T>;
template<class A, class B>
using pair = std::pair<A, B>;
template<class K, class V, class H=std::hash<K>, class E=std::equal_to<K>>
using unordered_map = std::unordered_map<K, V, H, E, std::allocator<std::pair<const K, V>>>;
using unordered_map = std::unordered_map<K, V, H, E, DrvAllocator<std::pair<const K, V>>>;
} // namespace drv
#endif // WRAP_UNORDERED_MAP_HPP

View File

@@ -19,7 +19,7 @@ using hash = std::hash<T>;
template<class T>
using equal_to = std::equal_to<T>;
template<class K, class H=std::hash<K>, class E=std::equal_to<K>>
using unordered_set = std::unordered_set<K, H, E, std::allocator<K>>;
using unordered_set = std::unordered_set<K, H, E, DrvAllocator<K>>;
} // namespace drv
#endif // WRAP_UNORDERED_SET_HPP

View File

@@ -7,11 +7,15 @@
namespace eng {
template<class A, class B>
using pair = std::pair<A, B>;
template< class T1, class T2 >
constexpr std::pair<T1,T2> make_pair( T1&& t, T2&& u ) { return std::make_pair(t,u); }
} // namespace eng
namespace drv {
template<class A, class B>
using pair = std::pair<A, B>;
template< class T1, class T2 >
constexpr std::pair<T1,T2> make_pair( T1&& t, T2&& u ) { return std::make_pair(t,u); }
} // namespace drv
#endif // WRAP_UTILITY_HPP

View File

@@ -11,7 +11,7 @@ using vector = std::vector<T, EngAllocator<T>>;
namespace drv {
template<class T>
using vector = std::vector<T, EngAllocator<T>>;
using vector = std::vector<T, DrvAllocator<T>>;
} // namespace drv
#endif // WRAP_VECTOR_HPP