use BROTLI_COLD in enc PiperOrigin-RevId: 799944930
diff --git a/c/enc/dictionary_hash.c b/c/enc/dictionary_hash.c index db13331..f367046 100644 --- a/c/enc/dictionary_hash.c +++ b/c/enc/dictionary_hash.c
@@ -21,7 +21,7 @@ #endif #if (BROTLI_STATIC_INIT != BROTLI_STATIC_INIT_NONE) -BROTLI_BOOL BrotliEncoderInitDictionaryHash( +BROTLI_BOOL BROTLI_COLD BrotliEncoderInitDictionaryHash( const BrotliDictionary* dict, uint16_t* words, uint8_t* lengths) { size_t global_idx = 0; size_t len;
diff --git a/c/enc/encode.c b/c/enc/encode.c index 279f173..ba21aa2 100644 --- a/c/enc/encode.c +++ b/c/enc/encode.c
@@ -1774,7 +1774,7 @@ return (BrotliEncoderPreparedDictionary*)managed_dictionary; } -void BrotliEncoderDestroyPreparedDictionary( +void BROTLI_COLD BrotliEncoderDestroyPreparedDictionary( BrotliEncoderPreparedDictionary* dictionary) { ManagedDictionary* dict = (ManagedDictionary*)dictionary; if (!dictionary) return; @@ -1800,7 +1800,8 @@ BrotliDestroyManagedDictionary(dict); } -BROTLI_BOOL BrotliEncoderAttachPreparedDictionary(BrotliEncoderState* state, +BROTLI_BOOL BROTLI_COLD BrotliEncoderAttachPreparedDictionary( + BrotliEncoderState* state, const BrotliEncoderPreparedDictionary* dictionary) { /* First field of dictionary structs */ const BrotliEncoderPreparedDictionary* dict = dictionary; @@ -1857,8 +1858,8 @@ return BROTLI_TRUE; } -size_t BrotliEncoderEstimatePeakMemoryUsage(int quality, int lgwin, - size_t input_size) { +size_t BROTLI_COLD BrotliEncoderEstimatePeakMemoryUsage(int quality, int lgwin, + size_t input_size) { BrotliEncoderParams params; size_t memory_manager_slots = BROTLI_ENCODER_MEMORY_MANAGER_SLOTS; size_t memory_manager_size = memory_manager_slots * sizeof(void*); @@ -1925,7 +1926,7 @@ histogram_size); } } -size_t BrotliEncoderGetPreparedDictionarySize( +size_t BROTLI_COLD BrotliEncoderGetPreparedDictionarySize( const BrotliEncoderPreparedDictionary* prepared_dictionary) { /* First field of dictionary structs */ const BrotliEncoderPreparedDictionary* prepared = prepared_dictionary;
diff --git a/c/enc/static_dict_lut.c b/c/enc/static_dict_lut.c index 4cdd8a1..b7a8706 100644 --- a/c/enc/static_dict_lut.c +++ b/c/enc/static_dict_lut.c
@@ -24,7 +24,7 @@ #if (BROTLI_STATIC_INIT != BROTLI_STATIC_INIT_NONE) /* TODO(eustas): deal with largest bucket(s). Not it contains 163 items. */ -static BROTLI_BOOL DoBrotliEncoderInitStaticDictionaryLut( +static BROTLI_BOOL BROTLI_COLD DoBrotliEncoderInitStaticDictionaryLut( const BrotliDictionary* dict, uint16_t* buckets, DictWord* words, void* arena) { DictWord* slots = (DictWord*)arena;