L4Re Operating System Framework – Interface and Usage Documentation
Loading...
Searching...
No Matches
Small C++ Template Library

Namespaces

namespace  cxx
 Our C++ library.
 

Data Structures

class  L4::Alloc_list
 A simple list-based allocator. More...
 
class  cxx::Bitmap_base
 Basic bitmap abstraction. More...
 
class  cxx::Bitmap< BITS >
 A static bit map. More...
 
class  cxx::List_item
 Basic list item. More...
 
struct  cxx::Pair< First, Second >
 Pair of two values. More...
 
class  cxx::Base_slab< Obj_size, Slab_size, Max_free, Alloc >
 Basic slab allocator. More...
 
class  cxx::Slab< Type, Slab_size, Max_free, Alloc >
 Slab allocator for object of type Type. More...
 
class  cxx::Base_slab_static< Obj_size, Slab_size, Max_free, Alloc >
 Merged slab allocator (allocators for objects of the same size are merged together). More...
 
class  cxx::Slab_static< Type, Slab_size, Max_free, Alloc >
 Merged slab allocator (allocators for objects of the same size are merged together). More...
 
class  cxx::Nothrow
 Helper type to distinguish the oeprator new version that does not throw exceptions. More...
 
class  cxx::New_allocator< _Type >
 Standard allocator based on operator new () . More...
 
class  L4::String
 A null-terminated string container class. More...
 

Functions

template<typename T1 >
T1 cxx::min (T1 a, T1 b)
 Get the minimum of a and b.
 
template<typename T1 >
T1 cxx::max (T1 a, T1 b)
 Get the maximum of a and b.
 
template<typename T1 >
T1 cxx::clamp (T1 v, T1 lo, T1 hi)
 Limit v to the range given by lo and hi.
 
void * operator new (size_t, void *mem, cxx::Nothrow const &) noexcept
 Simple placement new operator.
 
void * operator new (size_t, cxx::Nothrow const &) noexcept
 New operator that does not throw exceptions.
 
void operator delete (void *, cxx::Nothrow const &) noexcept
 Delete operator complementing the new operator not throwing exceptions.
 

Detailed Description

Function Documentation

◆ clamp()

template<typename T1 >
T1 cxx::clamp ( T1  v,
T1  lo,
T1  hi 
)
inline

Limit v to the range given by lo and hi.

Parameters
vThe value to clamp.
loThe lower boundary to clamp v to.
hiThe upper boundary to clamp v to.

Definition at line 58 of file minmax.

References cxx::max(), and cxx::min().

+ Here is the call graph for this function:

◆ max()

template<typename T1 >
T1 cxx::max ( T1  a,
T1  b 
)
inline

Get the maximum of a and b.

Parameters
athe first value.
bthe second value.

Definition at line 46 of file minmax.

Referenced by cxx::List_alloc::alloc_max(), and cxx::clamp().

+ Here is the caller graph for this function:

◆ min()

template<typename T1 >
T1 cxx::min ( T1  a,
T1  b 
)
inline

Get the minimum of a and b.

Parameters
athe first value.
bthe second value.
Examples
tmpfs/lib/src/fs.cc.

Definition at line 35 of file minmax.

Referenced by cxx::List_alloc::alloc_max(), cxx::clamp(), L4virtio::Svr::Data_buffer::copy_to(), operator>>(), operator>>(), L4virtio::Svr::Data_buffer::skip(), cxx::String::substr(), cxx::String::substr(), and L4virtio::Driver::Virtio_net_device::wait_rx().

+ Here is the caller graph for this function:

◆ operator new()

void * operator new ( size_t  ,
void *  mem,
cxx::Nothrow const &   
)
inlinenoexcept

Simple placement new operator.

Parameters
memthe address of the memory block to place the new object.
Returns
the address given by mem.

Definition at line 39 of file std_alloc.