mirror of
https://github.com/mmueller41/genode.git
synced 2026-01-21 12:32:56 +01:00
base: add Attached_dataspace::clear()
This alleviates the need (and risk) of manually parametrizing 'memset' whenever the entire dataspace shall be cleared. Issue #3897
This commit is contained in:
committed by
Christian Helmuth
parent
7019b795a6
commit
4d7a5b6829
@@ -139,6 +139,8 @@ class Genode::Attached_ram_dataspace
|
||||
*/
|
||||
size_t size() const { return _size; }
|
||||
|
||||
void clear() { if (_at) memset((void *)_at, 0, _size); }
|
||||
|
||||
void swap(Attached_ram_dataspace &other)
|
||||
{
|
||||
_swap(_size, other._size);
|
||||
|
||||
Reference in New Issue
Block a user