mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-18 13:26:27 +00: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:
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);
|
||||
|
Loading…
Reference in New Issue
Block a user