diff --git a/src/util/AllocatedArray.hxx b/src/util/AllocatedArray.hxx
index 86ac833ff..c37a3f992 100644
--- a/src/util/AllocatedArray.hxx
+++ b/src/util/AllocatedArray.hxx
@@ -121,6 +121,13 @@ public:
 		return buffer.size;
 	}
 
+	/**
+	 * Returns the number of allocated elements.
+	 */
+	constexpr size_type capacity() const noexcept {
+		return buffer.size;
+	}
+
 	reference_type front() noexcept {
 		return buffer.front();
 	}