summaryrefslogtreecommitdiffstats
path: root/xmrstak/rapidjson/allocators.h
diff options
context:
space:
mode:
Diffstat (limited to 'xmrstak/rapidjson/allocators.h')
-rw-r--r--xmrstak/rapidjson/allocators.h20
1 files changed, 10 insertions, 10 deletions
diff --git a/xmrstak/rapidjson/allocators.h b/xmrstak/rapidjson/allocators.h
index 98affe0..cf5f536 100644
--- a/xmrstak/rapidjson/allocators.h
+++ b/xmrstak/rapidjson/allocators.h
@@ -1,5 +1,5 @@
// Tencent is pleased to support the open source community by making RapidJSON available.
-//
+//
// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved.
//
// Licensed under the MIT License (the "License"); you may not use this file except
@@ -7,9 +7,9 @@
//
// http://opensource.org/licenses/MIT
//
-// 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
+// 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.
#ifndef RAPIDJSON_ALLOCATORS_H_
@@ -24,10 +24,10 @@ RAPIDJSON_NAMESPACE_BEGIN
/*! \class rapidjson::Allocator
\brief Concept for allocating, resizing and freeing memory block.
-
+
Note that Malloc() and Realloc() are non-static but Free() is static.
-
- So if an allocator need to support Free(), it needs to put its pointer in
+
+ So if an allocator need to support Free(), it needs to put its pointer in
the header of memory block.
\code
@@ -62,7 +62,7 @@ concept Allocator {
class CrtAllocator {
public:
static const bool kNeedFree = true;
- void* Malloc(size_t size) {
+ void* Malloc(size_t size) {
if (size) // behavior of malloc(0) is implementation defined.
return std::malloc(size);
else
@@ -83,7 +83,7 @@ public:
// MemoryPoolAllocator
//! Default memory allocator used by the parser and DOM.
-/*! This allocator allocate memory blocks from pre-allocated memory chunks.
+/*! This allocator allocate memory blocks from pre-allocated memory chunks.
It does not free memory blocks. And Realloc() only allocate new memory.
@@ -107,7 +107,7 @@ public:
/*! \param chunkSize The size of memory chunk. The default is kDefaultChunkSize.
\param baseAllocator The allocator for allocating memory chunks.
*/
- MemoryPoolAllocator(size_t chunkSize = kDefaultChunkCapacity, BaseAllocator* baseAllocator = 0) :
+ MemoryPoolAllocator(size_t chunkSize = kDefaultChunkCapacity, BaseAllocator* baseAllocator = 0) :
chunkHead_(0), chunk_capacity_(chunkSize), userBuffer_(0), baseAllocator_(baseAllocator), ownBaseAllocator_(0)
{
}
OpenPOWER on IntegriCloud