2018-04-23 16:08:57 +02:00
|
|
|
/*
|
2019-03-26 11:59:46 +01:00
|
|
|
* Copyright (C) 2018-2019 Intel Corporation
|
2018-09-18 09:11:08 +02:00
|
|
|
*
|
|
|
|
|
* SPDX-License-Identifier: MIT
|
|
|
|
|
*
|
|
|
|
|
*/
|
2018-04-23 16:08:57 +02:00
|
|
|
|
|
|
|
|
#include "runtime/os_interface/linux/allocator_helper.h"
|
|
|
|
|
|
2019-04-18 15:30:47 +02:00
|
|
|
#include "core/helpers/basic_math.h"
|
|
|
|
|
|
2019-03-26 11:59:46 +01:00
|
|
|
namespace NEO {
|
2019-04-18 15:30:47 +02:00
|
|
|
|
2018-04-23 16:08:57 +02:00
|
|
|
size_t getSizeToMap() {
|
|
|
|
|
return static_cast<size_t>(1 * 1024 * 1024u);
|
|
|
|
|
}
|
2019-04-18 15:30:47 +02:00
|
|
|
|
|
|
|
|
size_t getSizeToReserve() {
|
|
|
|
|
// 4 x sizeof(Heap32) + 2 x sizeof(Standard/Standard64k)
|
|
|
|
|
return (4 * 4 + 2 * 4) * GB;
|
|
|
|
|
}
|
|
|
|
|
|
2019-03-26 11:59:46 +01:00
|
|
|
} // namespace NEO
|