mirror of
https://github.com/RGBCube/serenity
synced 2025-05-16 06:34:58 +00:00
27 lines
451 B
C++
27 lines
451 B
C++
#include <Kernel/SharedMemory.h>
|
|
#include <Kernel/VM/VMObject.h>
|
|
|
|
SharedMemory::SharedMemory()
|
|
{
|
|
}
|
|
|
|
SharedMemory::~SharedMemory()
|
|
{
|
|
}
|
|
|
|
KResult SharedMemory::truncate(int length)
|
|
{
|
|
if (!length) {
|
|
m_vmo = nullptr;
|
|
return KSuccess;
|
|
}
|
|
|
|
if (!m_vmo) {
|
|
m_vmo = VMObject::create_anonymous(length);
|
|
return KSuccess;
|
|
}
|
|
|
|
// FIXME: Support truncation.
|
|
ASSERT_NOT_REACHED();
|
|
return KResult(-ENOTIMPL);
|
|
}
|