apio
5f698b4774
All checks were successful
continuous-integration/drone/push Build is passing
The old one was not getting freed, creating a memory leak every exec(), which can get huge over time. Plus, there was no need for a new stack. And we couldn't just free the old one, since sys_execve() runs on the old stack...
25 lines
314 B
C++
25 lines
314 B
C++
#pragma once
|
|
#include <luna/Types.h>
|
|
|
|
struct Stack
|
|
{
|
|
Stack() = default;
|
|
Stack(u64 base, usize bytes);
|
|
|
|
u64 bottom() const
|
|
{
|
|
return m_base;
|
|
}
|
|
|
|
u64 top() const;
|
|
|
|
usize bytes() const
|
|
{
|
|
return m_bytes;
|
|
}
|
|
|
|
private:
|
|
u64 m_base { 0 };
|
|
usize m_bytes { 0 };
|
|
};
|