kangkaisen commented on a change in pull request #1899: Use mem_pool replace 
arena first step
URL: https://github.com/apache/incubator-doris/pull/1899#discussion_r329056166
 
 

 ##########
 File path: be/src/olap/skiplist.h
 ##########
 @@ -186,7 +182,7 @@ struct SkipList<Key,Comparator>::Node {
 template<typename Key, class Comparator>
 typename SkipList<Key,Comparator>::Node*
 SkipList<Key,Comparator>::NewNode(const Key& key, int height) {
-    char* mem = arena_->AllocateAligned(
+    char* mem = (char*)_mem_pool->allocate(
 
 Review comment:
   If I don't think wrong, _mem_pool->allocate is equal with 
arena_->AllocateAligned.
   ```
       /// Allocates a section of memory of 'size' bytes with DEFAULT_ALIGNMENT 
at the end
       /// of the the current chunk. Creates a new chunk if there aren't any 
chunks
       /// with enough capacity.
       uint8_t* allocate(int64_t size) {
           return allocate<false>(size, DEFAULT_ALIGNMENT);
       }
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to