@@ -50,9 +50,6 @@ class VamanaInterface {
5050
5151 virtual size_t get_graph_max_degree () const = 0;
5252
53- // /// Memory accounting
54- virtual svs::index::vamana::MemoryBreakdown get_memory_breakdown () const = 0;
55-
5653 virtual void set_construction_window_size (size_t window_size) = 0;
5754 virtual size_t get_construction_window_size () const = 0;
5855
@@ -104,6 +101,12 @@ class VamanaInterface {
104101
105102 // Non-templated virtual method for distance calculation
106103 virtual double get_distance (size_t id, const AnonymousArray<1 >& query) const = 0;
104+
105+ // /// Memory accounting
106+ // New virtuals belong at the end of the interface: inserting one shifts every
107+ // later vtable slot, and a consumer built against the old header then dispatches
108+ // through the wrong slot with no link-time diagnostic.
109+ virtual svs::index::vamana::MemoryBreakdown get_memory_breakdown () const = 0;
107110};
108111
109112template <lib::TypeList QueryTypes, typename Impl, typename IFace = VamanaInterface>
@@ -130,10 +133,6 @@ class VamanaImpl : public manager::ManagerImpl<QueryTypes, Impl, IFace> {
130133
131134 size_t get_graph_max_degree () const override { return impl ().get_graph_max_degree (); }
132135
133- svs::index::vamana::MemoryBreakdown get_memory_breakdown () const override {
134- return impl ().get_memory_breakdown ();
135- }
136-
137136 void set_construction_window_size (size_t window_size) override {
138137 impl ().set_construction_window_size (window_size);
139138 }
@@ -274,6 +273,11 @@ class VamanaImpl : public manager::ManagerImpl<QueryTypes, Impl, IFace> {
274273 }
275274 );
276275 }
276+
277+ // /// Memory accounting
278+ svs::index::vamana::MemoryBreakdown get_memory_breakdown () const override {
279+ return impl ().get_memory_breakdown ();
280+ }
277281};
278282
279283// /// Forward declarations
0 commit comments