Files
compute-runtime/shared/source/os_interface/linux/os_memory_linux.h
Igor Venevtsev 0bc5e158e5 Pass preferred base address to OSMemory::reserveCpuAddressRange()
Related-To: NEO-4525

Change-Id: I6d97ae41af1a0fba31993683bfc669f79aa5b77b
Signed-off-by: Igor Venevtsev <igor.venevtsev@intel.com>
2020-05-28 11:39:27 +02:00

28 lines
636 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;
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