Procházet zdrojové kódy

add documentation in dmm_config header file and make it available at installation directory

Ioannis Koutras před 12 roky
rodič
revize
6b6a49ff97
2 změnil soubory, kde provedl 67 přidání a 7 odebrání
  1. 11 3
      CMakeLists.txt
  2. 56 4
      dmm_config.h.in

+ 11 - 3
CMakeLists.txt

@@ -111,6 +111,15 @@ configure_file (
 	"${PROJECT_BINARY_DIR}/dmm_config.h"
 )
 
+install(
+  FILES
+    ${PROJECT_BINARY_DIR}/dmm_config.h
+  DESTINATION
+    ${INCLUDE_INSTALL_DIR}
+  COMPONENT
+    headers
+)
+
 include_directories("${PROJECT_BINARY_DIR}")
 
 add_subdirectory(include)
@@ -162,9 +171,9 @@ if(RAW_BLOCKS_TYPE STREQUAL "freelist")
   message(STATUS "Splitting: " ${WITH_SPLITTING})
   if(MIN_SPLITTING_SIZE)
     if(WITH_SPLITTING STREQUAL "fixed")
-      message(STATUS "  with min. spliting size: " ${MIN_SPLITTING_SIZE} " bytes")
+      message(STATUS "  with min. splitting size: " ${MIN_SPLITTING_SIZE} " bytes")
     elseif(WITH_SPLITTING STREQUAL "variable")
-      message(STATUS "  with initial min. spliting size: "
+      message(STATUS "  with initial min. splitting size: "
         ${MIN_SPLITTING_SIZE} " bytes")
     endif(WITH_SPLITTING STREQUAL "fixed")
     if(COALESCE_AFTER_SPLIT)
@@ -182,7 +191,6 @@ message(STATUS "Have statistics: " ${STATS})
 message(STATUS "Requested Size per Block: " ${REQUEST_SIZE_INFO})
 message(STATUS "Support for debug functions: " ${WITH_DEBUG})
 message(STATUS "Trace level: " ${TRACE_LEVEL})
-message(STATUS "Adaptivity: " ${WITH_ADAPTIVITY})
 message(STATUS "Support for realloc(): " ${WITH_REALLOC})
 message(STATUS "Support for calloc(): " ${WITH_CALLOC})
 message(STATUS "********************************************")

+ 56 - 4
dmm_config.h.in

@@ -1,13 +1,46 @@
+/*
+ *   Copyright Institute of Communication and Computer Systems (ICCS) 
+ *
+ *   Licensed under the Apache License, Version 2.0 (the "License");
+ *   you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *   Unless required by applicable law or agreed to in writing, software
+ *   distributed under the License is distributed on an "AS IS" BASIS,
+ *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *   See the License for the specific language governing permissions and
+ *   limitations under the License.
+ *
+ */
+
+/**
+ * @file   dmm_config.h
+ * @author Ioannis Koutras (joko@microlab.ntua.gr)
+ * @date   November 2012
+ * @brief  Macro defines for dmmlib.
+ *
+ * Warning: This is a file which is generated automatically, you have to
+ * configure, compile and install dmmlib again in order to change the following
+ * macros.
+ */
+
 #ifndef DMM_CONFIG_H
 #define DMM_CONFIG_H
 
 /* General Settings */
 
+/** Support for freelist-organized raw blocks */
 #cmakedefine FL_RB_ONLY
+/** Support for bitmap-organized raw blocks */
 #cmakedefine BITMAP_RB_ONLY
+/** Default raw block size */
 #cmakedefine SYS_ALLOC_SIZE @SYS_ALLOC_SIZE@
+/** Support for locks */
 #cmakedefine HAVE_LOCKS
 
+/** Trace level */
 #cmakedefine TRACE_LEVEL @TRACE_LEVEL@
 
 /* Free-list Settings */
@@ -15,33 +48,49 @@
 
 /* Fitting Policies */
 
+/** Support for best-fit policy */
 #cmakedefine BEST_FIT
+/** Support for exact-fit policy */
 #cmakedefine EXACT_FIT
+/** Support for first-fit policy */
 #cmakedefine FIRST_FIT
+/** Support for good-fit policy */
 #cmakedefine GOOD_FIT
+/** Good-fit percentage */
 #cmakedefine GOOD_FIT_PERCENTAGE @GOOD_FIT_PERCENTAGE@
 
 /* Ordering Policies */
 
+/** Support for address-ordering */
 #cmakedefine ADDRESS_ORDERED
+/** Support for FIFO-ordering */
 #cmakedefine FIFO_ORDERED
+/** Support for LIFO-ordering */
 #cmakedefine LIFO_ORDERED
+/** Support for size-ordering */
 #cmakedefine SIZE_ORDERED
 
 /* Coalescing Settings */
 
+/** Support of coalescing of fixed size */
 #cmakedefine COALESCING_FIXED
+/** Support of coalescing of variable size */
 #cmakedefine COALESCING_VARIABLE
 
+/** Default maximum coalescing size */
 #cmakedefine MAX_COALESCE_SIZE @MAX_COALESCE_SIZE@
 
 /* Splitting Settings */
 
+/** Support of splitting of fixed size */
 #cmakedefine SPLITTING_FIXED
+/** Support of splitting of variable size */
 #cmakedefine SPLITTING_VARIABLE
 
+/** Default minimum splitting size */
 #cmakedefine MIN_SPLITTING_SIZE @MIN_SPLITTING_SIZE@
 
+/** Support to coalesce after splitting */
 #cmakedefine COALESCE_AFTER_SPLIT
 
 #endif /* FL_RB_ONLY */
@@ -54,21 +103,24 @@
 
 #endif /* BITMAP_RB_ONLY */
 
+/** Keep track of the requested size */
 #cmakedefine REQUEST_SIZE_INFO
 
+/** Support for statistics per raw block */
 #cmakedefine WITH_RAWBLOCK_STATS
+/** Support for global statistics */
 #cmakedefine WITH_ALLOCATOR_STATS
 
+/** Support for knobs */
 #cmakedefine WITH_KNOBS
 
+/** Support for debugging functions */
 #cmakedefine WITH_DEBUG
 
-#cmakedefine WITH_ADAPTIVITY
-
-#define MIN_FRAG_THRESHOLD 0.05
-
+/** Support for realloc() calls */
 #cmakedefine WITH_REALLOC
 
+/** Make raw block requests for sizes that are multiple of the pagesize */
 #cmakedefine PAGESIZE_ALIGN
 
 #endif /* DMM_CONFIG_H */