From fb469842598da834a33f2d5fee223d07dab53dad Mon Sep 17 00:00:00 2001
From: wangzhengquan <wangzhengquan85@126.com>
Date: 星期四, 16 七月 2020 12:12:20 +0800
Subject: [PATCH] update

---
 queue/include/lock_free_queue.h |   13 +++++--------
 1 files changed, 5 insertions(+), 8 deletions(-)

diff --git a/queue/include/lock_free_queue.h b/queue/include/lock_free_queue.h
index ca8adb4..566c7ed 100644
--- a/queue/include/lock_free_queue.h
+++ b/queue/include/lock_free_queue.h
@@ -73,20 +73,17 @@
 class LockFreeQueue
 {
 
-    template < typename ELEM_T_ >
-    friend class SHMQueue;
-
 private:
     int slots;
     int items;
-protected:
-     LockFreeQueue(size_t qsize = LOCK_FREE_Q_DEFAULT_SIZE);
+   
+public:
+    LockFreeQueue(size_t qsize = LOCK_FREE_Q_DEFAULT_SIZE);
     
     /// @brief destructor of the class. 
     /// Note it is not virtual since it is not expected to inherit from this
     /// template
     ~LockFreeQueue();
-public:
     std::atomic_uint reference;    
     /// @brief constructor of the class
    
@@ -337,7 +334,7 @@
     typename Allocator,
     template <typename T, typename AT> class Q_TYPE>
 void * LockFreeQueue<ELEM_T, Allocator, Q_TYPE>::operator new(size_t size){
-        return Allocator::malloc(size);
+        return Allocator::allocate(size);
 }
 
 template <
@@ -345,7 +342,7 @@
     typename Allocator,
     template <typename T, typename AT> class Q_TYPE>
 void LockFreeQueue<ELEM_T, Allocator, Q_TYPE>::operator delete(void *p) {
-    return Allocator::free(p);
+    return Allocator::deallocate(p);
 }
 
 // include implementation files

--
Gitblit v1.8.0