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

_______________________________________________
Freetype-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/freetype-devel

Reply via email to