Hi
I tried to change the memory allocation on VPP to set different mheap per
worker not a shared mheap per worker.
so on /vlib/threads.c at start_workers function chang as follow :

   if ( !strcmp( tr->name , "workers") )
   {
       tr->mheap_size = new_mheap_size ;
   }
   vec_add2 (vlib_worker_threads, w, 1);

  if (tr->mheap_size)
w->thread_mheap = mheap_alloc (0 , tr->mheap_size);
  else
w->thread_mheap = main_heap;

 by default the "tr->mheap_size" is zero so go into else and use the
main_heap but now allocate mheap for workers, but it has coredump as GDB
shows:

 Thread 1 "vpp_main" received signal SIGSEGV, Segmentation fault.
mheap_get_search_free_bin (align_offset=4, align=<optimized out>,
n_user_data_bytes_arg=<synthetic pointer>, bin=11, v=0x7fffb5bdd000) at
/root/CGNAT/build-data/../src/vppinfra/mheap.c:401
401       uword this_object_n_user_data_bytes = mheap_elt_data_bytes (e);

 Is it possible to set different mheap per worker ?


Thanks,
-Saeed
_______________________________________________
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev

Reply via email to