1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-11 18:20:43 +09:00

Kernel: Implement aligned operator new and use it

The compiler will use these to allocate objects that have alignment
requirements greater than that of our normal `operator new` (4/8 byte
aligned).

This means we can now use smart pointers for over-aligned types.

Fixes a FIXME.
This commit is contained in:
Daniel Bertalan 2021-07-15 12:08:35 +02:00 committed by Andreas Kling
parent c176680443
commit dd4ed4d22d
Notes: sideshowbarker 2024-07-18 08:55:00 +09:00
4 changed files with 41 additions and 10 deletions

View file

@ -1192,7 +1192,7 @@ public:
String backtrace();
private:
Thread(NonnullRefPtr<Process>, NonnullOwnPtr<Region>, NonnullRefPtr<Timer>, FPUState*);
Thread(NonnullRefPtr<Process>, NonnullOwnPtr<Region>, NonnullRefPtr<Timer>, NonnullOwnPtr<FPUState>);
IntrusiveListNode<Thread> m_process_thread_list_node;
int m_runnable_priority { -1 };
@ -1318,7 +1318,7 @@ private:
unsigned m_ipv4_socket_read_bytes { 0 };
unsigned m_ipv4_socket_write_bytes { 0 };
FPUState* m_fpu_state { nullptr };
OwnPtr<FPUState> m_fpu_state;
State m_state { Invalid };
String m_name;
u32 m_priority { THREAD_PRIORITY_NORMAL };