mirror of
https://github.com/genodelabs/genode.git
synced 2025-04-26 22:09:51 +00:00
37 lines
1.1 KiB
C++
37 lines
1.1 KiB
C++
/*
|
|
* \brief Error types
|
|
* \author Norman Feske
|
|
* \date 2025-03-05
|
|
*/
|
|
|
|
/*
|
|
* Copyright (C) 2025 Genode Labs GmbH
|
|
*
|
|
* This file is part of the Genode OS framework, which is distributed
|
|
* under the terms of the GNU Affero General Public License version 3.
|
|
*/
|
|
|
|
#ifndef _INCLUDE__BASE__ERROR_H_
|
|
#define _INCLUDE__BASE__ERROR_H_
|
|
|
|
namespace Genode {
|
|
|
|
/**
|
|
* Common error returned by constrained allocators
|
|
*
|
|
* OUT_OF_RAM and OUT_OF_CAPS can in principle be resolved by upgrading
|
|
* the resource budget of the allocator.
|
|
*
|
|
* DENIED expresses a situation where the allocator cannot satisfy the
|
|
* allocation for unresolvable reasons. For example, the allocator may
|
|
* have a hard limit of the number of allocations, or the allocation of
|
|
* a large contiguous range is prevented by internal fragmentation, or
|
|
* a requested alignment constraint cannot be met. In these cases, the
|
|
* allocator reflects the condition to the caller to stay healthy and let
|
|
* the caller fail gracefully or consciously panic at the caller side.
|
|
*/
|
|
enum class Alloc_error { OUT_OF_RAM, OUT_OF_CAPS, DENIED };
|
|
}
|
|
|
|
#endif /* _INCLUDE__BASE__ERROR_H_ */
|