base: Zero attached dataspace upon creation.

This commit is contained in:
Michael Mueller
2023-03-27 16:54:37 +02:00
parent 2042a2083f
commit 43df00ea55
2 changed files with 12 additions and 12 deletions

View File

@@ -14,6 +14,7 @@
#ifndef _INCLUDE__BASE__ATTACHED_RAM_DATASPACE_H_
#define _INCLUDE__BASE__ATTACHED_RAM_DATASPACE_H_
#include <util/string.h>
#include <util/touch.h>
#include <base/ram_allocator.h>
#include <base/env.h>
@@ -105,6 +106,7 @@ class Genode::Attached_ram_dataspace
_size(size), _ram(&ram), _rm(&rm), _cache(cache)
{
_alloc_and_attach();
memset(_local_addr, 0, _size);
}
/**