[Zlib-devel] #ifdef out strerror prototype for VMS

Mark Adler madler at alumni.caltech.edu
Sat Jun 26 13:42:18 EDT 2004


On Jun 26, 2004, at 7:30 AM, Glenn Randers-Pehrson wrote:
> Yes, we understood that, and can accept tradeoffs.  In
> this case it appears that the speed gain outweighs the 8k of increased
> code size.

There is also another choice.  You can #define DYNAMIC_CRC_TABLE and 
the tables will be built the first time crc32() is called.  It still 
takes memory, but no space in the object file.  The downside is that 
there can allegedly be unusual race conditions when crc32() is called 
from two threads and is initializing the tables twice or initializing 
and using the tables at the same time.  I'm not sure myself how that 
can be a problem, since it would just write the same things to the same 
memory, but I am told there can be unintended consequences.

If anyone knows of portable semaphore operations common in C libraries, 
I could try to fix this.  A quick look on Mac OS X reveals semget() and 
semop(), but I don't know if those are common.

mark





More information about the Zlib-devel mailing list