mirror of
https://github.com/genodelabs/genode.git
synced 2025-06-18 15:18:20 +00:00
core: re-design memory allocator (fix #1091)
* Core_mem_allocator: implement Range_allocator interface * Core_mem_allocator: allocate with page-granularity only * Use slab allocators in core where meaningful (e.g. dataspace objects)
This commit is contained in:
committed by
Norman Feske
parent
36bfb56e49
commit
0dece91973
22
base-linux/src/core/include/util.h
Normal file
22
base-linux/src/core/include/util.h
Normal file
@ -0,0 +1,22 @@
|
||||
/*
|
||||
* \brief Core-internal utilities
|
||||
* \author Stefan Kalkowski
|
||||
* \date 2014-03-10
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2014 Genode Labs GmbH
|
||||
*
|
||||
* This file is part of the Genode OS framework, which is distributed
|
||||
* under the terms of the GNU General Public License version 2.
|
||||
*/
|
||||
|
||||
#ifndef _CORE__INCLUDE__UTIL_H_
|
||||
#define _CORE__INCLUDE__UTIL_H_
|
||||
|
||||
namespace Genode {
|
||||
constexpr size_t get_page_size_log2() { return 12; }
|
||||
constexpr size_t get_page_size() { return 1 << get_page_size_log2(); }
|
||||
}
|
||||
|
||||
#endif /* _CORE__INCLUDE__UTIL_H_ */
|
Reference in New Issue
Block a user