]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - tools/perf/util/map.c
perf tools: Allocate thread map_groups's dynamically
[karo-tx-linux.git] / tools / perf / util / map.c
index 39cd2d0faff65667b32738a8788817b6c670cedb..ae4c5e12debdc76bcf1345e90faf9d2616e46a31 100644 (file)
@@ -358,6 +358,22 @@ void map_groups__exit(struct map_groups *mg)
        }
 }
 
+struct map_groups *map_groups__new(void)
+{
+       struct map_groups *mg = malloc(sizeof(*mg));
+
+       if (mg != NULL)
+               map_groups__init(mg);
+
+       return mg;
+}
+
+void map_groups__delete(struct map_groups *mg)
+{
+       map_groups__exit(mg);
+       free(mg);
+}
+
 void map_groups__flush(struct map_groups *mg)
 {
        int type;