20 #include FT_INTERNAL_DEBUG_H
21 #include FT_INTERNAL_MEMORY_H
22 #include FT_INTERNAL_OBJECTS_H
33 #define FT_COMPONENT trace_memory
57 if ( !error && size > 0 )
76 block = memory->alloc( memory, size );
78 error = FT_Err_Out_Of_Memory;
102 cur_count, new_count, block, &error );
103 if ( !error && new_count > cur_count )
105 ( new_count - cur_count ) * item_size );
127 if ( cur_count < 0 || new_count < 0 || item_size < 0 )
132 else if ( new_count == 0 || item_size == 0 )
139 error = FT_Err_Array_Too_Large;
141 else if ( cur_count == 0 )
145 block =
ft_mem_alloc( memory, new_count*item_size, &error );
150 FT_Long cur_size = cur_count*item_size;
151 FT_Long new_size = new_count*item_size;
154 block2 = memory->realloc( memory, cur_size, new_size, block );
155 if ( block2 ==
NULL )
156 error = FT_Err_Out_Of_Memory;
171 memory->free( memory, (
void*)P );
185 if ( !error && address )
202 return ft_mem_dup( memory, str, len, p_error );
211 while ( size > 1 && *src != 0 )
236 #define FT_COMPONENT trace_list
250 if ( cur->
data == data )
315 before->
next = after;
320 after->
prev = before;
342 before->
next = after;
345 after->
prev = before;
350 node->
next = list->head;
351 list->head->
prev = node;
372 error = iterator( cur, user );
425 value2 = value & (value - 1);
435 #ifdef FT_CONFIG_OPTION_OLD_INTERNALS
#define FT_ALLOC(ptr, size)
ft_mem_strdup(FT_Memory memory, const char *str, FT_Error *p_error)
GLvoid **typedef void(GLAPIENTRY *PFNGLGETVERTEXATTRIBDVPROC)(GLuint
ft_mem_free(FT_Memory memory, const void *P)
#define FT_MEM_ZERO(dest, count)
FT_Error(* FT_List_Iterator)(FT_ListNode node, void *user)
return FT_Err_Invalid_Argument
FT_List_Finalize(FT_List list, FT_List_Destructor destroy, FT_Memory memory, void *user)
ft_mem_qalloc(FT_Memory memory, FT_Long size, FT_Error *p_error)
ft_mem_alloc(FT_Memory memory, FT_Long size, FT_Error *p_error)
FT_List_Remove(FT_List list, FT_ListNode node)
#define FT_QALLOC(ptr, size)
#define FT_QREALLOC(ptr, cursz, newsz)
#define FT_ASSERT(condition)
FT_List_Iterate(FT_List list, FT_List_Iterator iterator, void *user)
FT_List_Up(FT_List list, FT_ListNode node)
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
FT_BEGIN_HEADER FT_List_Find(FT_List list, void *data)
GLuint GLuint64EXT address
local int destroy(gz_stream *s)
typedefFT_BEGIN_HEADER struct FT_MemoryRec_ * FT_Memory
FT_List_Add(FT_List list, FT_ListNode node)
ft_mem_realloc(FT_Memory memory, FT_Long item_size, FT_Long cur_count, FT_Long new_count, void *block, FT_Error *p_error)
EGLSurface EGLint void ** value
#define FT_REALLOC(ptr, cursz, newsz)
ft_mem_dup(FT_Memory memory, const void *address, FT_ULong size, FT_Error *p_error)
FT_List_Insert(FT_List list, FT_ListNode node)
void(* FT_List_Destructor)(FT_Memory memory, void *data, void *user)
ft_mem_qrealloc(FT_Memory memory, FT_Long item_size, FT_Long cur_count, FT_Long new_count, void *block, FT_Error *p_error)
ft_mem_strcpyn(char *dst, const char *src, FT_ULong size)
ft_highpow2(FT_UInt32 value)