mirror of
https://github.com/mmueller41/genode.git
synced 2026-01-21 20:42:56 +01:00
allocator oom error message
This commit is contained in:
@@ -1,11 +1,15 @@
|
||||
#include "allocator_stupid.h"
|
||||
#include <base/log.h>
|
||||
|
||||
using namespace Genode;
|
||||
|
||||
void* Allocator_stupid::alloc(size_t size)
|
||||
{
|
||||
if(m_curr + size > m_end)
|
||||
{
|
||||
Genode::error("Allocator_stupid: OOM!");
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
const addr_t naddr = m_curr;
|
||||
m_curr += size;
|
||||
|
||||
Reference in New Issue
Block a user