Skip to contentSkip to conversation

DYNAMIC_CRC_TABLE ????

U-Boot-Users DeLaGarza 1 participant 1 message Apr 15, 2003

lore
Share & tools
lore

DeLaGarza

#0 lore raw
Quoted 5 lines · On Tuesday, April 15, 2003 1:21 AM, Steven Scholz [SMTP:steven.scholz at…

The file crc32.c contains some #ifdef DYNAMIC_CRC_TABLE .

What's the purpose of that?
Are there any advantages of defining that?

That directive enables one to create the crc_table[256] array at run time, rather than compiling it into the code.

One advantage of doing this is that it reduces the size of the code; only the function used to generate the table needs to be stored in non-volatile memory, rather than the entire table (for a 32-bit long, the table will occupy 1 kilobyte of memory).