CUBRID Engine  latest
db_json_allocator.hpp
Go to the documentation of this file.
1 /*
2  * Copyright 2008 Search Solution Corporation
3  * Copyright 2016 CUBRID Corporation
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  */
18 
19 #ifndef _DB_JSON_PRIVATE_ALLOCATOR_
20 #define _DB_JSON_PRIVATE_ALLOCATOR_
21 
22 #include "db_rapidjson.hpp"
23 
25 {
26  public:
27  static const bool kNeedFree;
28  void *Malloc (size_t size);
29  void *Realloc (void *originalPtr, size_t originalSize, size_t newSize);
30  static void Free (void *ptr);
31 };
32 
33 typedef rapidjson::MemoryPoolAllocator <JSON_PRIVATE_ALLOCATOR> JSON_PRIVATE_MEMPOOL;
34 
35 #endif
void * Realloc(void *originalPtr, size_t originalSize, size_t newSize)
static const bool kNeedFree
rapidjson::MemoryPoolAllocator< JSON_PRIVATE_ALLOCATOR > JSON_PRIVATE_MEMPOOL
void * Malloc(size_t size)
static void Free(void *ptr)