vppinfra: remove the historical mheap memory allocator
[vpp.git] / src / vppinfra / CMakeLists.txt
index 02e5322..3998ae6 100644 (file)
@@ -17,12 +17,6 @@ enable_language(ASM)
 # Generate vppinfra/config.h
 ##############################################################################
 set(LOG2_CACHE_LINE_BYTES ${VPP_LOG2_CACHE_LINE_SIZE})
-option(VPP_USE_DLMALLOC "Use dlmalloc memory allocator." ON)
-if(VPP_USE_DLMALLOC)
-  set(DLMALLOC 1)
-else(VPP_USE_DLMALLOC)
-  set(DLMALLOC 0)
-endif(VPP_USE_DLMALLOC)
 
 configure_file(
   ${CMAKE_SOURCE_DIR}/vppinfra/config.h.in
@@ -40,8 +34,10 @@ install(
 ##############################################################################
 set(VPPINFRA_SRCS
   backtrace.c
+  bihash_all_vector.c
   cpu.c
   cuckoo_template.c
+  dlmalloc.c
   elf.c
   elog.c
   error.c
@@ -54,13 +50,15 @@ set(VPPINFRA_SRCS
   longjmp.S
   macros.c
   maplog.c
+  mem_dlmalloc.c
   mhash.c
+  mpcap.c
   pcap.c
   pmalloc.c
   pool.c
   ptclosure.c
-  random.c
   random_buffer.c
+  random.c
   random_isaac.c
   rbtree.c
   serialize.c
@@ -70,13 +68,12 @@ set(VPPINFRA_SRCS
   string.c
   time.c
   time_range.c
-  timer.c
   timing_wheel.c
-  tw_timer_2t_1w_2048sl.c
-  tw_timer_16t_2w_512sl.c
   tw_timer_16t_1w_2048sl.c
-  tw_timer_4t_3w_256sl.c
+  tw_timer_16t_2w_512sl.c
   tw_timer_1t_3w_1024sl_ov.c
+  tw_timer_2t_1w_2048sl.c
+  tw_timer_4t_3w_256sl.c
   unformat.c
   unix-formats.c
   unix-misc.c
@@ -87,6 +84,7 @@ set(VPPINFRA_SRCS
 )
 
 set(VPPINFRA_HEADERS
+  sanitizer.h
   bihash_16_8.h
   bihash_24_8.h
   bihash_40_8.h
@@ -99,6 +97,7 @@ set(VPPINFRA_HEADERS
   bitops.h
   byte_order.h
   cache.h
+  callback.h
   clib_error.h
   clib.h
   cpu.h
@@ -121,6 +120,7 @@ set(VPPINFRA_HEADERS
   hash.h
   heap.h
   lb_hash_hash.h
+  llist.h
   lock.h
   longjmp.h
   macros.h
@@ -131,8 +131,8 @@ set(VPPINFRA_HEADERS
   memcpy_sse3.h
   mem.h
   mhash.h
-  mheap_bootstrap.h
   mheap.h
+  mpcap.h
   os.h
   pcap.h
   pcap_funcs.h
@@ -154,7 +154,6 @@ set(VPPINFRA_HEADERS
   string.h
   time.h
   time_range.h
-  timer.h
   timing_wheel.h
   tw_timer_16t_1w_2048sl.h
   tw_timer_16t_2w_512sl.h
@@ -166,7 +165,6 @@ set(VPPINFRA_HEADERS
   types.h
   atomics.h
   unix.h
-  valgrind.h
   valloc.h
   vec_bootstrap.h
   vec.h
@@ -192,19 +190,6 @@ if("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux")
    )
 endif()
 
-
-if(VPP_USE_DLMALLOC)
-  list(APPEND VPPINFRA_SRCS
-    dlmalloc.c
-    mem_dlmalloc.c
-  )
-else(VPP_USE_DLMALLOC)
-  list(APPEND VPPINFRA_SRCS
-    mheap.c
-    mem_mheap.c
-  )
-endif(VPP_USE_DLMALLOC)
-
 add_vpp_library(vppinfra
   SOURCES ${VPPINFRA_SRCS}
   LINK_LIBRARIES m
@@ -237,9 +222,11 @@ if(VPP_BUILD_VPPINFRA_TESTS)
     ptclosure
     random
     random_isaac
+    rwlock
     serialize
     slist
     socket
+    spinlock
     time
     time_range
     timing_wheel
@@ -250,7 +237,7 @@ if(VPP_BUILD_VPPINFRA_TESTS)
   )
     add_vpp_executable(test_${test}
       SOURCES test_${test}.c
-      LINK_LIBRARIES vppinfra
+      LINK_LIBRARIES vppinfra pthread
       )
   endforeach()