util/HugeAllocator: throw std::bad_alloc on error

This commit is contained in:
Max Kellermann
2016-06-17 17:44:45 +02:00
parent 35faafb32c
commit ef053035d0
7 changed files with 39 additions and 54 deletions

View File

@@ -88,13 +88,6 @@ public:
SliceBuffer(const SliceBuffer &other) = delete;
SliceBuffer &operator=(const SliceBuffer &other) = delete;
/**
* @return true if buffer allocation (by the constructor) has failed
*/
bool IsOOM() {
return data == nullptr;
}
unsigned GetCapacity() const {
return n_max;
}