L4Re Operating System Framework
Interface and Usage Documentation
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
mem_alloc
Go to the documentation of this file.
1// -*- Mode: C++ -*-
2// vim:ft=cpp
7/*
8 * Copyright (C) 2014-2016, 2019, 2021, 2024 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 * License: see LICENSE.spdx (in this directory or the directories above)
18 */
19#pragma once
20
21#include <l4/sys/capability>
22#include <l4/sys/factory>
23
24namespace L4Re {
25class Dataspace;
26
27// MISSING:
28// * alignment constraints
29// * shall we support superpages in noncont memory?
30
51 public L4::Kobject_t<Mem_alloc, L4::Factory, L4::PROTO_EMPTY>
52{
53public:
61 {
62 Continuous = 0x01,
63 Pinned = 0x02,
64 Super_pages = 0x04,
65 Fixed_paddr = 0x08,
67 };
68
97 long alloc(long size, L4::Cap<Dataspace> mem,
98 unsigned long flags = 0, unsigned long align = 0,
99 l4_addr_t paddr = 0) const noexcept;
100};
101
102};
L4::Cap related definitions.
Memory allocation interface.
Definition mem_alloc:52
Mem_alloc_flags
Flags for the allocator.
Definition mem_alloc:61
C++ interface for capabilities.
Definition capability.h:219
Helper class to create an L4Re interface class that is derived from a single base class.
Definition __typeinfo.h:750
Common factory related definitions.
unsigned long l4_addr_t
Address type.
Definition l4int.h:34
#define L4_EXPORT
Attribute to mark functions, variables, and data types as being exported from a library.
Definition compiler.h:210
L4Re C++ Interfaces.
Definition cmd_control:14