address_cast SNMALLOC_FAST_PATH

This commit is contained in:
Nathaniel Wesley Filardo
2021-10-13 15:29:10 +01:00
committed by Nathaniel Wesley Filardo
parent 3109ae9f72
commit b57390663e

View File

@@ -63,7 +63,7 @@ namespace snmalloc
* Cast from a pointer type to an address.
*/
template<typename T>
inline address_t address_cast(T* ptr)
inline SNMALLOC_FAST_PATH address_t address_cast(T* ptr)
{
return reinterpret_cast<address_t>(ptr);
}
@@ -77,7 +77,7 @@ namespace snmalloc
*/
template<typename T, enum capptr_bounds bounds>
inline address_t address_cast(CapPtr<T, bounds> a)
inline SNMALLOC_FAST_PATH address_t address_cast(CapPtr<T, bounds> a)
{
return address_cast(a.unsafe_ptr());
}