/* * Copyright (C) 2018-2021 Intel Corporation * * SPDX-License-Identifier: MIT * */ #pragma once #include #include #include namespace NEO { class AddressMapper { public: AddressMapper(); ~AddressMapper(); // maps to continuous region uint32_t map(void *vm, size_t size); // unmaps void unmap(void *vm); protected: struct MapInfo { void *vm; size_t size; uint32_t ggtt; }; std::vector mapping; std::atomic nextPage; }; } // namespace NEO