Revert "AK: Align Function storage to __BIGGEST_ALIGNMENT__ outside…

…kernel"
This reverts commit d4d92184b3.
The alignemnt requirements imposed by this are overkill at best and
ridiculous at worst, a future commit will tackle this problem in a
different, more space-efficient way.
This commit is contained in:
Ali Mohammad Pur 2023-09-14 14:36:00 +03:30 committed by Ali Mohammad Pur
parent 06d05b3c55
commit 5e0a28c947
Notes: sideshowbarker 2024-07-16 23:38:54 +09:00

View File

@ -284,13 +284,11 @@ private:
#ifndef KERNEL
// Empirically determined to fit most lambdas and functions.
static constexpr size_t inline_capacity = 4 * sizeof(void*);
alignas(__BIGGEST_ALIGNMENT__) u8 m_storage[inline_capacity];
#else
// FIXME: Try to decrease this.
static constexpr size_t inline_capacity = 6 * sizeof(void*);
// In the Kernel nothing has an alignment > alignof(void*).
alignas(alignof(void*)) u8 m_storage[inline_capacity];
#endif
alignas(max(alignof(CallableWrapperBase), alignof(CallableWrapperBase*))) u8 m_storage[inline_capacity];
};
}