diff --git a/AK/StackInfo.h b/AK/StackInfo.h index 668bbd802f2..f741cd54561 100644 --- a/AK/StackInfo.h +++ b/AK/StackInfo.h @@ -19,8 +19,8 @@ public: size_t size() const { return m_size; } size_t size_free() const { - FlatPtr dummy; - return reinterpret_cast(&dummy) - m_base; + auto p = reinterpret_cast(__builtin_frame_address(0)); + return p - m_base; } private: