summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryangwei <[email protected]>2024-08-16 09:54:33 +0800
committeryangwei <[email protected]>2024-08-16 10:48:40 +0800
commita59eca7685e126226d5c2b4679a2a90711cc5875 (patch)
treee84b0f1323f514b34e0d0d6e190486702464c31d
parentb6969710d69cce3ca9aeb710b49f66192d0286ca (diff)
🦄 refactor(rename deps/memool): from mempool to nmx_pool
-rw-r--r--decoders/http/http_decoder_inc.h2
-rw-r--r--decoders/http/http_decoder_result_queue.h2
-rw-r--r--deps/CMakeLists.txt2
-rw-r--r--deps/mempool/CMakeLists.txt2
-rw-r--r--deps/nmx_pool/CMakeLists.txt2
-rw-r--r--deps/nmx_pool/nmx_alloc.c (renamed from deps/mempool/nmx_alloc.c)2
-rw-r--r--deps/nmx_pool/nmx_alloc.h (renamed from deps/mempool/nmx_alloc.h)0
-rw-r--r--deps/nmx_pool/nmx_palloc.c (renamed from deps/mempool/nmx_palloc.c)0
-rw-r--r--deps/nmx_pool/nmx_palloc.h (renamed from deps/mempool/nmx_palloc.h)0
-rw-r--r--src/core/CMakeLists.txt2
-rw-r--r--src/id_generator/CMakeLists.txt2
-rw-r--r--src/times/CMakeLists.txt2
12 files changed, 9 insertions, 9 deletions
diff --git a/decoders/http/http_decoder_inc.h b/decoders/http/http_decoder_inc.h
index aee121c..52c364f 100644
--- a/decoders/http/http_decoder_inc.h
+++ b/decoders/http/http_decoder_inc.h
@@ -29,7 +29,7 @@ extern "C"
#include "stellar/stellar_mq.h"
#include "stellar/stellar_exdata.h"
-#include "mempool/nmx_palloc.h"
+#include "nmx_pool/nmx_palloc.h"
#include "stellar/utils.h"
#include "stellar/http.h"
#include "http_decoder_result_queue.h"
diff --git a/decoders/http/http_decoder_result_queue.h b/decoders/http/http_decoder_result_queue.h
index 4d024eb..97d68a6 100644
--- a/decoders/http/http_decoder_result_queue.h
+++ b/decoders/http/http_decoder_result_queue.h
@@ -11,7 +11,7 @@
#define _HTTP_DECODER_RESULT_QUEUE_H_
#include <stddef.h>
-#include "mempool/nmx_palloc.h"
+#include "nmx_pool/nmx_palloc.h"
#include "http_decoder_half.h"
struct http_decoder_result {
diff --git a/deps/CMakeLists.txt b/deps/CMakeLists.txt
index 75db075..58773e3 100644
--- a/deps/CMakeLists.txt
+++ b/deps/CMakeLists.txt
@@ -4,4 +4,4 @@ add_subdirectory(toml)
add_subdirectory(rbtree)
add_subdirectory(interval_tree)
add_subdirectory(bitmap)
-add_subdirectory(mempool) \ No newline at end of file
+add_subdirectory(nmx_pool) \ No newline at end of file
diff --git a/deps/mempool/CMakeLists.txt b/deps/mempool/CMakeLists.txt
deleted file mode 100644
index 2079076..0000000
--- a/deps/mempool/CMakeLists.txt
+++ /dev/null
@@ -1,2 +0,0 @@
-add_definitions(-fPIC)
-add_library(mempool STATIC nmx_alloc.c nmx_palloc.c) \ No newline at end of file
diff --git a/deps/nmx_pool/CMakeLists.txt b/deps/nmx_pool/CMakeLists.txt
new file mode 100644
index 0000000..757711b
--- /dev/null
+++ b/deps/nmx_pool/CMakeLists.txt
@@ -0,0 +1,2 @@
+add_definitions(-fPIC)
+add_library(nmx_pool STATIC nmx_alloc.c nmx_palloc.c) \ No newline at end of file
diff --git a/deps/mempool/nmx_alloc.c b/deps/nmx_pool/nmx_alloc.c
index 973bfa5..d799cd8 100644
--- a/deps/mempool/nmx_alloc.c
+++ b/deps/nmx_pool/nmx_alloc.c
@@ -35,7 +35,7 @@ void *nmx_realloc(void *p, size_t size){
void *nmx_memalign(size_t alignment, size_t size)
{
- void *p;
+ void *p=NULL;
posix_memalign(&p, alignment, size);
return p;
diff --git a/deps/mempool/nmx_alloc.h b/deps/nmx_pool/nmx_alloc.h
index 123d5bf..123d5bf 100644
--- a/deps/mempool/nmx_alloc.h
+++ b/deps/nmx_pool/nmx_alloc.h
diff --git a/deps/mempool/nmx_palloc.c b/deps/nmx_pool/nmx_palloc.c
index 307e2f6..307e2f6 100644
--- a/deps/mempool/nmx_palloc.c
+++ b/deps/nmx_pool/nmx_palloc.c
diff --git a/deps/mempool/nmx_palloc.h b/deps/nmx_pool/nmx_palloc.h
index 0b69be1..0b69be1 100644
--- a/deps/mempool/nmx_palloc.h
+++ b/deps/nmx_pool/nmx_palloc.h
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt
index 59461d0..2772926 100644
--- a/src/core/CMakeLists.txt
+++ b/src/core/CMakeLists.txt
@@ -1,6 +1,6 @@
set(SOURCE stellar_config.cpp stellar_stat.cpp stellar_core.cpp)
set(LIBRARY times session_manager plugin_manager ip_reassembly
- packet_io packet pthread fieldstat4 toml hexdump mempool
+ packet_io packet pthread fieldstat4 toml hexdump nmx_pool
http_decoder)
add_library(stellar_core STATIC ${SOURCE})
diff --git a/src/id_generator/CMakeLists.txt b/src/id_generator/CMakeLists.txt
index 4f05afe..269a571 100644
--- a/src/id_generator/CMakeLists.txt
+++ b/src/id_generator/CMakeLists.txt
@@ -1,5 +1,5 @@
add_library(id_generator id_generator.cpp)
target_include_directories(id_generator PUBLIC ${CMAKE_CURRENT_LIST_DIR})
target_include_directories(id_generator PUBLIC ${CMAKE_SOURCE_DIR}/include/stellar)
-target_include_directories(id_generator PUBLIC ${CMAKE_SOURCE_DIR}/src/stellar)
+target_include_directories(id_generator PUBLIC ${CMAKE_SOURCE_DIR}/src/core)
target_link_libraries(id_generator PRIVATE stellar_core log) \ No newline at end of file
diff --git a/src/times/CMakeLists.txt b/src/times/CMakeLists.txt
index 864d16f..51d26d1 100644
--- a/src/times/CMakeLists.txt
+++ b/src/times/CMakeLists.txt
@@ -1,6 +1,6 @@
add_library(times times.cpp)
target_include_directories(times PUBLIC ${CMAKE_CURRENT_LIST_DIR})
-target_include_directories(times PUBLIC ${CMAKE_SOURCE_DIR}/src/stellar)
+target_include_directories(times PUBLIC ${CMAKE_SOURCE_DIR}/src/core)
target_link_libraries(times)
add_subdirectory(test) \ No newline at end of file