freetype-commit
[Top][All Lists]
Advanced

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

[Git][freetype/freetype][master] [cache] Avoid some memory zeroing.


From: Alexei Podtelezhnikov (@apodtele)
Subject: [Git][freetype/freetype][master] [cache] Avoid some memory zeroing.
Date: Sun, 12 Sep 2021 18:37:24 +0000

Alexei Podtelezhnikov pushed to branch master at FreeType / FreeType

Commits:

3 changed files:

Changes:

  • src/cache/ftccache.c
    ... ... @@ -135,7 +135,7 @@
    135 135
     
    
    136 136
     
    
    137 137
               /* if we can't expand the array, leave immediately */
    
    138
    -          if ( FT_RENEW_ARRAY( cache->buckets,
    
    138
    +          if ( FT_QRENEW_ARRAY( cache->buckets,
    
    139 139
                                    ( mask + 1 ) * 2, ( mask + 1 ) * 4 ) )
    
    140 140
                 break;
    
    141 141
             }
    
    ... ... @@ -189,7 +189,7 @@
    189 189
     
    
    190 190
     
    
    191 191
               /* if we can't shrink the array, leave immediately */
    
    192
    -          if ( FT_RENEW_ARRAY( cache->buckets,
    
    192
    +          if ( FT_QRENEW_ARRAY( cache->buckets,
    
    193 193
                                    ( mask + 1 ) * 2, mask + 1 ) )
    
    194 194
                 break;
    
    195 195
     
    
    ... ... @@ -341,7 +341,7 @@
    341 341
         cache->mask  = FTC_HASH_INITIAL_SIZE - 1;
    
    342 342
         cache->slack = FTC_HASH_INITIAL_SIZE * FTC_HASH_MAX_LOAD;
    
    343 343
     
    
    344
    -    (void)FT_NEW_ARRAY( cache->buckets, FTC_HASH_INITIAL_SIZE * 2 );
    
    344
    +    (void)FT_QNEW_ARRAY( cache->buckets, FTC_HASH_INITIAL_SIZE * 2 );
    
    345 345
         return error;
    
    346 346
       }
    
    347 347
     
    

  • src/cache/ftcmanag.c
    ... ... @@ -597,7 +597,7 @@
    597 597
             goto Exit;
    
    598 598
           }
    
    599 599
     
    
    600
    -      if ( !FT_ALLOC( cache, clazz->cache_size ) )
    
    600
    +      if ( !FT_QALLOC( cache, clazz->cache_size ) )
    
    601 601
           {
    
    602 602
             cache->manager   = manager;
    
    603 603
             cache->memory    = memory;
    

  • src/cache/ftcmru.c
    ... ... @@ -262,7 +262,7 @@
    262 262
           if ( list->clazz.node_done )
    
    263 263
             list->clazz.node_done( node, list->data );
    
    264 264
         }
    
    265
    -    else if ( FT_ALLOC( node, list->clazz.node_size ) )
    
    265
    +    else if ( FT_QALLOC( node, list->clazz.node_size ) )
    
    266 266
           goto Exit;
    
    267 267
     
    
    268 268
         error = list->clazz.node_init( node, key, list->data );
    


  • reply via email to

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