rename file
This commit is contained in:
parent
6494ed7690
commit
6889e19bf9
|
@ -13,8 +13,8 @@
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _TD_MALLOCATOR_H_
|
#ifndef _TD_UTIL_MALLOCATOR_H_
|
||||||
#define _TD_MALLOCATOR_H_
|
#define _TD_UTIL_MALLOCATOR_H_
|
||||||
|
|
||||||
#include "os.h"
|
#include "os.h"
|
||||||
|
|
||||||
|
@ -29,10 +29,10 @@ extern "C" {
|
||||||
void (*free_)(struct TYPE *, void *ptr); \
|
void (*free_)(struct TYPE *, void *ptr); \
|
||||||
}
|
}
|
||||||
#define TD_MA_MALLOC_FUNC(TMA) (TMA)->malloc_
|
#define TD_MA_MALLOC_FUNC(TMA) (TMA)->malloc_
|
||||||
#define TD_MA_FREE_FUNC(TMA) (TMA)->free_
|
#define TD_MA_FREE_FUNC(TMA) (TMA)->free_
|
||||||
|
|
||||||
#define TD_MA_MALLOC(TMA, SIZE) (*((TMA)->malloc_))(TMA, (SIZE))
|
#define TD_MA_MALLOC(TMA, SIZE) (*((TMA)->malloc_))(TMA, (SIZE))
|
||||||
#define TD_MA_FREE(TMA, PTR) (*((TMA)->free_))(TMA, (PTR))
|
#define TD_MA_FREE(TMA, PTR) (*((TMA)->free_))(TMA, (PTR))
|
||||||
|
|
||||||
typedef struct SMemAllocator {
|
typedef struct SMemAllocator {
|
||||||
void *impl;
|
void *impl;
|
||||||
|
@ -40,7 +40,7 @@ typedef struct SMemAllocator {
|
||||||
} SMemAllocator;
|
} SMemAllocator;
|
||||||
|
|
||||||
#define tMalloc(pMA, SIZE) TD_MA_MALLOC(PMA, SIZE)
|
#define tMalloc(pMA, SIZE) TD_MA_MALLOC(PMA, SIZE)
|
||||||
#define tFree(pMA, PTR) TD_MA_FREE(PMA, PTR)
|
#define tFree(pMA, PTR) TD_MA_FREE(PMA, PTR)
|
||||||
|
|
||||||
typedef struct SMemAllocatorFactory {
|
typedef struct SMemAllocatorFactory {
|
||||||
void *impl;
|
void *impl;
|
||||||
|
@ -52,4 +52,4 @@ typedef struct SMemAllocatorFactory {
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /*_TD_MALLOCATOR_H_*/
|
#endif /*_TD_UTIL_MALLOCATOR_H_*/
|
|
@ -16,8 +16,7 @@
|
||||||
#ifndef _TD_META_H_
|
#ifndef _TD_META_H_
|
||||||
#define _TD_META_H_
|
#define _TD_META_H_
|
||||||
|
|
||||||
#include "mallocator.h"
|
#include "tmallocator.h"
|
||||||
#include "os.h"
|
|
||||||
#include "tmsg.h"
|
#include "tmsg.h"
|
||||||
#include "trow.h"
|
#include "trow.h"
|
||||||
|
|
||||||
|
|
|
@ -18,9 +18,8 @@
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "executor.h"
|
#include "executor.h"
|
||||||
#include "mallocator.h"
|
#include "tmallocator.h"
|
||||||
#include "meta.h"
|
#include "meta.h"
|
||||||
#include "os.h"
|
|
||||||
#include "scheduler.h"
|
#include "scheduler.h"
|
||||||
#include "taoserror.h"
|
#include "taoserror.h"
|
||||||
#include "tlist.h"
|
#include "tlist.h"
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
#ifndef _TD_TSDB_H_
|
#ifndef _TD_TSDB_H_
|
||||||
#define _TD_TSDB_H_
|
#define _TD_TSDB_H_
|
||||||
|
|
||||||
#include "mallocator.h"
|
#include "tmallocator.h"
|
||||||
#include "meta.h"
|
#include "meta.h"
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "tfs.h"
|
#include "tfs.h"
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
#ifndef _TD_META_DEF_H_
|
#ifndef _TD_META_DEF_H_
|
||||||
#define _TD_META_DEF_H_
|
#define _TD_META_DEF_H_
|
||||||
|
|
||||||
#include "mallocator.h"
|
#include "tmallocator.h"
|
||||||
|
|
||||||
#include "meta.h"
|
#include "meta.h"
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
#ifndef _TD_TSDB_DEF_H_
|
#ifndef _TD_TSDB_DEF_H_
|
||||||
#define _TD_TSDB_DEF_H_
|
#define _TD_TSDB_DEF_H_
|
||||||
|
|
||||||
#include "mallocator.h"
|
#include "tmallocator.h"
|
||||||
#include "meta.h"
|
#include "meta.h"
|
||||||
#include "tcompression.h"
|
#include "tcompression.h"
|
||||||
#include "tglobal.h"
|
#include "tglobal.h"
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
#ifndef _TD_VNODE_DEF_H_
|
#ifndef _TD_VNODE_DEF_H_
|
||||||
#define _TD_VNODE_DEF_H_
|
#define _TD_VNODE_DEF_H_
|
||||||
|
|
||||||
#include "mallocator.h"
|
#include "tmallocator.h"
|
||||||
// #include "sync.h"
|
// #include "sync.h"
|
||||||
#include "tcoding.h"
|
#include "tcoding.h"
|
||||||
#include "tfs.h"
|
#include "tfs.h"
|
||||||
|
|
|
@ -13,7 +13,8 @@
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "mallocator.h"
|
#define _DEFAULT_SOURCE
|
||||||
|
#include "tmallocator.h"
|
||||||
|
|
||||||
/* ------------------------ HEAP ALLOCATOR ------------------------ */
|
/* ------------------------ HEAP ALLOCATOR ------------------------ */
|
||||||
#if 0
|
#if 0
|
Loading…
Reference in New Issue