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 );
103 cur_count, new_count, block, &
error );
104 if ( !
error && new_count > cur_count )
106 ( new_count - cur_count ) * item_size );
128 if ( cur_count < 0 || new_count < 0 || item_size < 0 )
133 else if ( new_count == 0 || item_size == 0 )
142 else if ( cur_count == 0 )
151 FT_Long cur_size = cur_count*item_size;
152 FT_Long new_size = new_count*item_size;
155 block2 = memory->realloc( memory, cur_size, new_size, block );
156 if ( block2 ==
NULL )
172 memory->free( memory, (
void*)P );
212 while (
size > 1 && *
src != 0 )
237 #define FT_COMPONENT trace_list 251 if ( cur->
data == data )
316 before->
next = after;
321 after->
prev = before;
343 before->
next = after;
346 after->
prev = before;
351 node->
next = list->head;
352 list->head->
prev = node;
373 error = iterator( cur, user );
403 destroy( memory, data, user );
436 #ifdef FT_CONFIG_OPTION_OLD_INTERNALS #define FT_ALLOC(ptr, size)
FT_List_Remove(FT_List list, FT_ListNode node)
ft_mem_strcpyn(char *dst, const char *src, FT_ULong size)
FT_List_Insert(FT_List list, FT_ListNode node)
#define FT_MEM_ZERO(dest, count)
FT_List_Iterate(FT_List list, FT_List_Iterator iterator, void *user)
ft_mem_qalloc(FT_Memory memory, FT_Long size, FT_Error *p_error)
FT_List_Up(FT_List list, FT_ListNode node)
return FT_THROW(Missing_Property)
void(* FT_List_Destructor)(FT_Memory memory, void *data, void *user)
#define FT_QALLOC(ptr, size)
typedef void(APIENTRY *GLDEBUGPROCARB)(GLenum source
#define FT_QREALLOC(ptr, cursz, newsz)
#define FT_ASSERT(condition)
ft_mem_dup(FT_Memory memory, const void *address, FT_ULong size, FT_Error *p_error)
GLsizei GLsizei GLenum GLenum const GLvoid * data
ft_mem_free(FT_Memory memory, const void *P)
ft_mem_realloc(FT_Memory memory, FT_Long item_size, FT_Long cur_count, FT_Long new_count, void *block, FT_Error *p_error)
GLsizei const GLfloat * value
typedefFT_BEGIN_HEADER struct FT_MemoryRec_ * FT_Memory
FT_List_Add(FT_List list, FT_ListNode node)
FT_Error(* FT_List_Iterator)(FT_ListNode node, 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)
#define FT_REALLOC(ptr, cursz, newsz)
FT_List_Finalize(FT_List list, FT_List_Destructor destroy, FT_Memory memory, void *user)
ft_highpow2(FT_UInt32 value)
ft_mem_strdup(FT_Memory memory, const char *str, FT_Error *p_error)
ft_mem_alloc(FT_Memory memory, FT_Long size, FT_Error *p_error)
FT_List_Find(FT_List list, void *data)