2019-04-18 21:30:47 +08:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2019 Intel Corporation
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: MIT
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
#include <cstddef>
|
2019-07-30 22:46:58 +08:00
|
|
|
#include <memory>
|
2019-04-18 21:30:47 +08:00
|
|
|
|
|
|
|
namespace NEO {
|
|
|
|
|
|
|
|
struct OSMemory {
|
|
|
|
public:
|
2019-07-30 22:46:58 +08:00
|
|
|
static std::unique_ptr<OSMemory> create();
|
|
|
|
|
|
|
|
virtual ~OSMemory() = default;
|
|
|
|
virtual void *reserveCpuAddressRange(size_t sizeToReserve) = 0;
|
|
|
|
virtual void releaseCpuAddressRange(void *reservedCpuAddressRange, size_t reservedSize) = 0;
|
2019-04-18 21:30:47 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace NEO
|