I just noticed that it isn't ignored, but I still don't understand the purpose. If the check fails, it simply procedes to __rw_allocate. Since the code I am tracking has sent in a block so large that the code will not be able to address it all, I would think it would stop here. Is __rw_allocate supposed to handle this?
-----Original Message----- From: Nicole Willson [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 25, 2006 11:15 AM To: Stdcxx Subject: RE: problem in temp_buffer I'm tracking down an issue with temp_buffer in stdlib/utilities. I'm confused by a piece of code in source/stdlib/tmpbuf.cpp: if (nbytes <= _RWSTD_TMPBUF_SIZE) { if (1 == _RWSTD_THREAD_PREINCREMENT (__rw_buffer_busy, false)) { *pptr = buffer; // static buffer used, its usage counter stays non-zero return _RWSTD_TMPBUF_SIZE / size; } // static buffer not used, decrement its usage counter _RWSTD_THREAD_PREDECREMENT (__rw_buffer_busy, false); } _TRY { *pptr = __rw_allocate (nbytes, 0); } _CATCH (...) { *pptr = 0; nbytes = 0; } return nbytes / size; What is the purpose of the check against _RWSTD_TMPBUF_SIZE if it is ignored? Nicole Willson Consulting Engineer Rogue Wave Software, Inc. A Division of Quovadx 303-545-3210
