freetype-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ft-devel] porting freetype to Texas DSP C55x


From: Peter M
Subject: Re: [ft-devel] porting freetype to Texas DSP C55x
Date: Mon, 27 Feb 2006 14:44:28 +0100

I have tried to make the changes and I have next problems:

 

- I need size of the block to "free":

       I tried to save it in the “user”

 

- When I use "MEM_redefine" in don’t get a pointer returned:

So I redefine the block and return the same pointer.

 

When I debug the code I see code cycles every 53 steps. Alloc trays to

Allocate the same size and returns the same pointer.

Can someone help?

 

 

 

====================================================== 

  FT_CALLBACK_DEF( void* )

  ft_alloc( FT_Memory  memory,

            long       size )

  {

    FT_UNUSED( memory );

 

       memory->user    = (void*)size;

       return (void* )MEM_alloc( SDRAM, size, 2 );

 

    //return malloc( size );

  }

 

======================================================

  FT_CALLBACK_DEF( void* )

  ft_realloc( FT_Memory  memory,

              long       cur_size,

              long       new_size,

              void*      block )

  {

    FT_UNUSED( memory );

    FT_UNUSED( cur_size );

 

       memory->user    = (void*)new_size;

       MEM_redefine( SDRAM, block, new_size );

       return (memory);

 

    //return realloc( block, new_size );

  }

 

======================================================

  FT_CALLBACK_DEF( void )

  ft_free( FT_Memory  memory,

           void*      block )

  {

    FT_UNUSED( memory );

 

       (void* ) MEM_free( SDRAM, block, (int)memory->user );

 

//    free( block );      

  }

 

Thanks

Peter M


reply via email to

[Prev in Thread] Current Thread [Next in Thread]