util/HugeAllocator: add SetName()

This commit is contained in:
Max Kellermann
2022-04-26 20:18:07 +02:00
parent 3ae660ca90
commit 7ed67d216b
4 changed files with 41 additions and 3 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2003-2021 The Music Player Daemon Project
* Copyright 2003-2022 The Music Player Daemon Project
* http://www.musicpd.org
*
* This program is free software; you can redistribute it and/or modify
@@ -85,6 +85,10 @@ public:
return n_allocated == buffer.size();
}
void SetName(const char *name) noexcept {
buffer.SetName(name);
}
void DiscardMemory() noexcept {
assert(empty());