mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-30 22:54:35 +03:00
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:
parent
06d05b3c55
commit
5e0a28c947
Notes:
sideshowbarker
2024-07-16 23:38:54 +09:00
Author: https://github.com/alimpfard Commit: https://github.com/SerenityOS/serenity/commit/5e0a28c947 Pull-request: https://github.com/SerenityOS/serenity/pull/21071 Reviewed-by: https://github.com/ADKaster ✅ Reviewed-by: https://github.com/BertalanD Reviewed-by: https://github.com/bugaevc Reviewed-by: https://github.com/kleinesfilmroellchen ✅
@ -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];
|
||||
};
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user