summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/include/memrange.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/include/memrange.h b/src/include/memrange.h
index f8fa033cee..ea3b118d41 100644
--- a/src/include/memrange.h
+++ b/src/include/memrange.h
@@ -81,6 +81,11 @@ static inline void range_entry_update_tag(struct range_entry *r,
r->tag = new_tag;
}
+static inline bool memranges_is_empty(struct memranges *ranges)
+{
+ return ranges->entries == NULL;
+}
+
/* Iterate over each entry in a memranges structure. Ranges cannot
* be deleted while processing each entry as the list cannot be safely
* traversed after such an operation.