mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-27 07:44:16 +08:00
- ensure OSMemoryLinux::reserveCpuAddressRange() calls mmap() with -1 as fd param Related-To: NEO-2877, NEO-3530 Change-Id: I2d5903291726b086af8b913f92b64e8c38c23462 Signed-off-by: Venevtsev, Igor <igor.venevtsev@intel.com>
24 lines
453 B
C++
24 lines
453 B
C++
/*
|
|
* Copyright (C) 2019 Intel Corporation
|
|
*
|
|
* SPDX-License-Identifier: MIT
|
|
*
|
|
*/
|
|
|
|
#pragma once
|
|
#include <cstddef>
|
|
#include <memory>
|
|
|
|
namespace NEO {
|
|
|
|
struct OSMemory {
|
|
public:
|
|
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;
|
|
};
|
|
|
|
} // namespace NEO
|