mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-01-22 16:40:57 +01:00
32 lines
1 KiB
C++
32 lines
1 KiB
C++
#pragma once
|
|
|
|
#include "error/ErrorCode.hpp"
|
|
#include "kernel/MemoryResource.hpp"
|
|
#include "rx/AddressRange.hpp"
|
|
#include "rx/EnumBitSet.hpp"
|
|
#include <cstdint>
|
|
|
|
namespace orbis {
|
|
using kernel::AllocationFlags;
|
|
struct IoDevice;
|
|
struct File;
|
|
} // namespace orbis
|
|
|
|
namespace orbis::pmem {
|
|
ErrorCode initialize(rx::Mappable mappable, std::uint64_t size);
|
|
void destroy();
|
|
std::pair<rx::AddressRange, ErrorCode>
|
|
allocate(std::uint64_t addressHint, std::uint64_t size,
|
|
rx::EnumBitSet<AllocationFlags> flags, std::uint64_t alignment);
|
|
ErrorCode deallocate(rx::AddressRange range);
|
|
std::optional<rx::AddressRange> query(std::uint64_t address);
|
|
ErrorCode map(std::uint64_t virtualAddress, rx::AddressRange range,
|
|
rx::EnumBitSet<rx::mem::Protection> protection);
|
|
void *mapInternal(rx::AddressRange range,
|
|
rx::EnumBitSet<rx::mem::Protection> protection);
|
|
void unmapInternal(void *data, std::size_t size);
|
|
std::size_t getSize();
|
|
IoDevice *getDevice();
|
|
File *getFile();
|
|
} // namespace orbis::pmem
|