now crazy mode

This commit is contained in:
user
2026-02-03 20:15:35 +01:00
parent 0d9c32fd14
commit 13e63b825d
2 changed files with 2 additions and 2 deletions

View File

@@ -52,7 +52,7 @@ void Thread::resume(Thread *next) {
context_switch(&next->context, &context); context_switch(&next->context, &context);
} }
void* operator new(size_t sz) void* Thread::operator new(size_t sz) noexcept
{ {
if (sz == 0) if (sz == 0)
++sz; // avoid std::malloc(0) which may return nullptr on success ++sz; // avoid std::malloc(0) which may return nullptr on success

View File

@@ -69,6 +69,7 @@ class Thread {
void* user; void* user;
void* isr; void* isr;
} StackPointer; } StackPointer;
void* operator new ( size_t count )noexcept;
/*! \brief Unique thread id */ /*! \brief Unique thread id */
const size_t id; const size_t id;
@@ -118,5 +119,4 @@ class Thread {
// //
void* operator new ( size_t count );
}; };