mirror of
https://github.com/boostorg/beast.git
synced 2025-07-31 13:27:33 +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
|
* Fix UB in websocket read tests
|
||||||
* Remove redundant includes in websocket
|
* Remove redundant includes in websocket
|
||||||
* Simplify websocket::detail::prng
|
* Simplify websocket::detail::prng
|
||||||
|
* Don't over-allocate in http::basic_fields
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
@ -196,7 +196,7 @@ private:
|
|||||||
|
|
||||||
using rebind_type = typename
|
using rebind_type = typename
|
||||||
beast::detail::allocator_traits<Allocator>::
|
beast::detail::allocator_traits<Allocator>::
|
||||||
template rebind_alloc<element>;
|
template rebind_alloc<align_type>;
|
||||||
|
|
||||||
using alloc_traits =
|
using alloc_traits =
|
||||||
beast::detail::allocator_traits<rebind_type>;
|
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(element) + e.off_ + e.len_ + 2 + sizeof(align_type) - 1) /
|
||||||
sizeof(align_type);
|
sizeof(align_type);
|
||||||
e.~element();
|
e.~element();
|
||||||
alloc_traits::deallocate(a, &e, n);
|
alloc_traits::deallocate(a,
|
||||||
//reinterpret_cast<align_type*>(&e), n);
|
reinterpret_cast<align_type*>(&e), n);
|
||||||
}
|
}
|
||||||
|
|
||||||
template<class Allocator>
|
template<class Allocator>
|
||||||
|
Reference in New Issue
Block a user