|
|
|
@ -108,6 +108,11 @@ FT_BEGIN_HEADER |
|
|
|
|
FT_Long size, |
|
|
|
|
void* *P ); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
FT_BASE( FT_Error ) |
|
|
|
|
FT_QAlloc( FT_Memory memory, |
|
|
|
|
FT_Long size, |
|
|
|
|
void* *p );
|
|
|
|
|
|
|
|
|
|
/*************************************************************************/ |
|
|
|
|
/* */ |
|
|
|
@ -143,6 +148,12 @@ FT_BEGIN_HEADER |
|
|
|
|
FT_Long size, |
|
|
|
|
void* *P ); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
FT_BASE( FT_Error ) |
|
|
|
|
FT_QRealloc( FT_Memory memory, |
|
|
|
|
FT_Long current, |
|
|
|
|
FT_Long size, |
|
|
|
|
void* *p );
|
|
|
|
|
|
|
|
|
|
/*************************************************************************/ |
|
|
|
|
/* */ |
|
|
|
@ -204,6 +215,14 @@ FT_BEGIN_HEADER |
|
|
|
|
FT_Realloc_Debug( memory, _current_, _size_, \
|
|
|
|
|
(void**)&(_pointer_), __FILE__, __LINE__ ) |
|
|
|
|
|
|
|
|
|
#define FT_MEM_QALLOC( _pointer_, _size_ ) \ |
|
|
|
|
FT_QAlloc_Debug( memory, _size_, \
|
|
|
|
|
(void**)&(_pointer_), __FILE__, __LINE__ ) |
|
|
|
|
|
|
|
|
|
#define FT_MEM_QREALLOC( _pointer_, _current_, _size_ ) \ |
|
|
|
|
FT_QRealloc_Debug( memory, _current_, _size_, \
|
|
|
|
|
(void**)&(_pointer_), __FILE__, __LINE__ ) |
|
|
|
|
|
|
|
|
|
#define FT_MEM_FREE( _pointer_ ) \ |
|
|
|
|
FT_Free_Debug( memory, (void**)&(_pointer_), __FILE__, __LINE__ ) |
|
|
|
|
|
|
|
|
@ -220,6 +239,11 @@ FT_BEGIN_HEADER |
|
|
|
|
#define FT_MEM_REALLOC( _pointer_, _current_, _size_ ) \ |
|
|
|
|
FT_Realloc( memory, _current_, _size_, (void**)&(_pointer_) ) |
|
|
|
|
|
|
|
|
|
#define FT_MEM_QALLOC( _pointer_, _size_ ) \ |
|
|
|
|
FT_QAlloc( memory, _size_, (void**)&(_pointer_) ) |
|
|
|
|
|
|
|
|
|
#define FT_MEM_QREALLOC( _pointer_, _current_, _size_ ) \ |
|
|
|
|
FT_QRealloc( memory, _current_, _size_, (void**)&(_pointer_) ) |
|
|
|
|
|
|
|
|
|
#endif /* !FT_DEBUG_MEMORY */ |
|
|
|
|
|
|
|
|
@ -240,6 +264,16 @@ FT_BEGIN_HEADER |
|
|
|
|
FT_MEM_REALLOC( _pointer_, (_old_) * sizeof ( *(_pointer_) ), \
|
|
|
|
|
(_new_) * sizeof ( *(_pointer_) ) ) |
|
|
|
|
|
|
|
|
|
#define FT_MEM_QNEW( _pointer_ ) \ |
|
|
|
|
FT_MEM_QALLOC( _pointer_, sizeof ( *(_pointer_) ) ) |
|
|
|
|
|
|
|
|
|
#define FT_MEM_QNEW_ARRAY( _pointer_, _count_ ) \ |
|
|
|
|
FT_MEM_QALLOC( _pointer_, (_count_) * sizeof ( *(_pointer_) ) ) |
|
|
|
|
|
|
|
|
|
#define FT_MEM_QRENEW_ARRAY( _pointer_, _old_, _new_ ) \ |
|
|
|
|
FT_MEM_QREALLOC( _pointer_, (_old_) * sizeof ( *(_pointer_) ), \
|
|
|
|
|
(_new_) * sizeof ( *(_pointer_) ) ) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************/ |
|
|
|
|
/* */ |
|
|
|
@ -270,6 +304,13 @@ FT_BEGIN_HEADER |
|
|
|
|
#define FT_FREE( _pointer_ ) \ |
|
|
|
|
FT_MEM_FREE( _pointer_ ) |
|
|
|
|
|
|
|
|
|
#define FT_QALLOC( _pointer_, _size_ ) \ |
|
|
|
|
FT_SET_ERROR( FT_MEM_QALLOC( _pointer_, _size_ ) ) |
|
|
|
|
|
|
|
|
|
#define FT_QREALLOC( _pointer_, _current_, _size_ ) \ |
|
|
|
|
FT_SET_ERROR( FT_MEM_QREALLOC( _pointer_, _current_, _size_ ) ) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#define FT_NEW( _pointer_ ) \ |
|
|
|
|
FT_SET_ERROR( FT_MEM_NEW( _pointer_ ) ) |
|
|
|
|
|
|
|
|
@ -279,6 +320,18 @@ FT_BEGIN_HEADER |
|
|
|
|
#define FT_RENEW_ARRAY( _pointer_, _old_, _new_ ) \ |
|
|
|
|
FT_SET_ERROR( FT_MEM_RENEW_ARRAY( _pointer_, _old_, _new_ ) ) |
|
|
|
|
|
|
|
|
|
#define FT_QNEW( _pointer_ ) \ |
|
|
|
|
FT_SET_ERROR( FT_MEM_QNEW( _pointer_ ) ) |
|
|
|
|
|
|
|
|
|
#define FT_QNEW_ARRAY( _pointer_, _count_ ) \ |
|
|
|
|
FT_SET_ERROR( FT_MEM_QNEW_ARRAY( _pointer_, _count_ ) ) |
|
|
|
|
|
|
|
|
|
#define FT_QRENEW_ARRAY( _pointer_, _old_, _new_ ) \ |
|
|
|
|
FT_SET_ERROR( FT_MEM_QRENEW_ARRAY( _pointer_, _old_, _new_ ) ) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#define FT_ALLOC_ARRAY( _pointer_, _count_, _type_ ) \ |
|
|
|
|
FT_SET_ERROR( FT_MEM_ALLOC( _pointer_, \
|
|
|
|
|
(_count_) * sizeof ( _type_ ) ) ) |
|
|
|
|