mirror of
https://github.com/boostorg/beast.git
synced 2025-07-29 20:37:31 +02:00
Don't over-allocate in http::basic_fields
This commit is contained in:
@ -4,6 +4,7 @@ Version 261:
|
||||
* Fix UB in websocket read tests
|
||||
* Remove redundant includes in websocket
|
||||
* Simplify websocket::detail::prng
|
||||
* Don't over-allocate in http::basic_fields
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
|
@ -196,7 +196,7 @@ private:
|
||||
|
||||
using rebind_type = typename
|
||||
beast::detail::allocator_traits<Allocator>::
|
||||
template rebind_alloc<element>;
|
||||
template rebind_alloc<align_type>;
|
||||
|
||||
using alloc_traits =
|
||||
beast::detail::allocator_traits<rebind_type>;
|
||||
|
@ -990,8 +990,8 @@ delete_element(element& e)
|
||||
(sizeof(element) + e.off_ + e.len_ + 2 + sizeof(align_type) - 1) /
|
||||
sizeof(align_type);
|
||||
e.~element();
|
||||
alloc_traits::deallocate(a, &e, n);
|
||||
//reinterpret_cast<align_type*>(&e), n);
|
||||
alloc_traits::deallocate(a,
|
||||
reinterpret_cast<align_type*>(&e), n);
|
||||
}
|
||||
|
||||
template<class Allocator>
|
||||
|
Reference in New Issue
Block a user