mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-21 01:04:57 +08:00
Related-To: NEO-4525 Change-Id: Ic3f9f04b42a10c2cc33f489a87d6b4b5fa1eedaa Signed-off-by: Igor Venevtsev <igor.venevtsev@intel.com>
30 lines
694 B
C++
30 lines
694 B
C++
/*
|
|
* Copyright (C) 2019-2020 Intel Corporation
|
|
*
|
|
* SPDX-License-Identifier: MIT
|
|
*
|
|
*/
|
|
|
|
#include "shared/source/os_interface/os_memory.h"
|
|
|
|
#include <fcntl.h>
|
|
#include <sys/mman.h>
|
|
|
|
namespace NEO {
|
|
|
|
class OSMemoryLinux : public OSMemory {
|
|
public:
|
|
OSMemoryLinux() = default;
|
|
|
|
void getMemoryMaps(MemoryMaps &memoryMaps) override;
|
|
|
|
protected:
|
|
void *osReserveCpuAddressRange(void *baseAddress, size_t sizeToReserve) override;
|
|
void osReleaseCpuAddressRange(void *reservedCpuAddressRange, size_t reservedSize) override;
|
|
|
|
MOCKABLE_VIRTUAL void *mmapWrapper(void *, size_t, int, int, int, off_t);
|
|
MOCKABLE_VIRTUAL int munmapWrapper(void *, size_t);
|
|
};
|
|
|
|
} // namespace NEO
|