L4Re Operating System Framework – Interface and Usage Documentation
Loading...
Searching...
No Matches
mem_alloc
Go to the documentation of this file.
1// -*- Mode: C++ -*-
2// vim:ft=cpp
7/*
8 * Copyright (C) 2014-2016, 2019, 2021 Kernkonzept GmbH.
9 * Author(s): Alexander Warg <alexander.warg@kernkonzept.com>
10 */
11/*
12 * (c) 2008-2009 Adam Lackorzynski <adam@os.inf.tu-dresden.de>,
13 * Alexander Warg <warg@os.inf.tu-dresden.de>,
14 * Torsten Frenzel <frenzel@os.inf.tu-dresden.de>
15 * economic rights: Technische Universität Dresden (Germany)
16 *
17 * This file is part of TUD:OS and distributed under the terms of the
18 * GNU General Public License 2.
19 * Please see the COPYING-GPL-2 file for details.
20 *
21 * As a special exception, you may use this file as part of a free software
22 * library without restriction. Specifically, if other files instantiate
23 * templates or use macros or inline functions from this file, or you compile
24 * this file and link it with other files to produce an executable, this
25 * file does not by itself cause the resulting executable to be covered by
26 * the GNU General Public License. This exception does not however
27 * invalidate any other reasons why the executable file might be covered by
28 * the GNU General Public License.
29 */
30#pragma once
31
32#include <l4/sys/capability>
33#include <l4/sys/factory>
34
35namespace L4Re {
36class Dataspace;
37
38// MISSING:
39// * alignment constraints
40// * shall we support superpages in noncont memory?
41
62 public L4::Kobject_t<Mem_alloc, L4::Factory, L4::PROTO_EMPTY>
63{
64public:
72 {
73 Continuous = 0x01,
74 Pinned = 0x02,
75 Super_pages = 0x04,
76 };
77
104 long alloc(long size, L4::Cap<Dataspace> mem,
105 unsigned long flags = 0, unsigned long align = 0) const noexcept;
106};
107
108};
L4::Cap related definitions.
Memory allocation interface.
Definition mem_alloc:63
Mem_alloc_flags
Flags for the allocator.
Definition mem_alloc:72
C++ interface for capabilities.
Definition capability.h:222
Helper class to create an L4Re interface class that is derived from a single base class.
Definition __typeinfo.h:760
Common factory related definitions.
#define L4_EXPORT
Attribute to mark functions, variables, and data types as being exported from a library.
Definition compiler.h:221
L4Re C++ Interfaces.
Definition cmd_control:15