Ignore:
Timestamp:
Mar 22, 2008, 10:39:25 AM (14 years ago)
Author:
Sam Hocevar
Message:
  • Get rid of jmalloc and replace it with standard malloc. Modern operating systems certainly perform a lot better than this custom implementation, and we have superior tools (eg. valgrind) to debug and profile memory usage without interfering with the code itself.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • abuse/trunk/src/config.cpp

    r124 r129  
    9393    if( key_map )
    9494    {
    95         jfree( key_map );
     95        free( key_map );
    9696    }
    9797    key_map = NULL;
     
    100100    if( key_players )
    101101    {
    102         key_map = ( player_keys *)jmalloc(sizeof(player_keys)*key_players,"key bindings");
     102        key_map = ( player_keys *)malloc(sizeof(player_keys)*key_players);
    103103        for( int i = 0; i < key_players; i++ )
    104104        {
     
    128128    if( key_map )
    129129    {
    130         jfree( key_map );
     130        free( key_map );
    131131    }
    132132    key_map = NULL;
    133133
    134134    key_players = 1;
    135     key_map = (player_keys *)jmalloc( sizeof( player_keys ) * key_players, "key bindings" );
     135    key_map = (player_keys *)malloc( sizeof( player_keys ) * key_players );
    136136    for( int i = 0; i < key_players; i++ )
    137137    {
     
    224224    if(key_map)
    225225    {
    226         jfree(key_map);
     226        free(key_map);
    227227        key_map = NULL;
    228228    }
Note: See TracChangeset for help on using the changeset viewer.