misc: move to new pool_foreach macros
[vpp.git] / src / svm / svmtool.c
index 6d1a2b1..61f8372 100644 (file)
@@ -35,7 +35,6 @@
 #include <vppinfra/bitmap.h>
 #include <vppinfra/fifo.h>
 #include <vppinfra/time.h>
-#include <vppinfra/mheap.h>
 #include <vppinfra/heap.h>
 #include <vppinfra/pool.h>
 #include <vppinfra/format.h>
@@ -74,10 +73,10 @@ format_all_svm_regions (u8 * s, va_list * args)
    * find_or_create.
    */
   /* *INDENT-OFF* */
-  pool_foreach (subp, mp->subregions, ({
+  pool_foreach (subp, mp->subregions)  {
         name = vec_dup (subp->subregion_name);
         vec_add1(svm_names, name);
-      }));
+      }
   /* *INDENT-ON* */
 
   pthread_mutex_unlock (&root_rp->mutex);
@@ -329,10 +328,10 @@ subregion_repair (char *chroot_path)
    * find_or_create.
    */
   /* *INDENT-OFF* */
-  pool_foreach (subp, mp->subregions, ({
+  pool_foreach (subp, mp->subregions)  {
         name = vec_dup (subp->subregion_name);
         vec_add1(svm_names, name);
-      }));
+      }
   /* *INDENT-ON* */
 
   pthread_mutex_unlock (&root_rp->mutex);
@@ -458,6 +457,8 @@ main (int argc, char **argv)
   char *chroot_path = 0;
   u8 *chroot_u8;
 
+  clib_mem_init_thread_safe (0, 128 << 20);
+
   unformat_init_command_line (&input, argv);
 
   while (unformat_check_input (&input) != UNFORMAT_END_OF_INPUT)