07.04.2014 9:43, Alex Peshkoff wrote: > 2 questions. > 1. Where from did you get an estimation that 3 is enough? > + static const int MAX_UNDO_RECORDS=3;
Vlad's observation in this thread showed that with current code 2 is enough. I used 3 because I'm trying to rework VIO_verb_cleanup() to fix orphan index nodes/blobs. New approach will need max 3 simultaneously active undo record buffers. > 2. I see later in the code that in worst case MAX_UNDO_RECORDS may be > overflowed, causing bugcheck. Do you mean fb_assert(false)? It is just a trap for bugs in calling code. In release build it is no-op and the routine will fallback to dynamic buffers causing bigger memory consumption but without other negative effects. > Why not use HALF_STATIC_ARRAY here to avoid it? I was told that this piece of code is time-critical. Half static array adds unnecessary overhead. Besides, it will let bugs in calling code to live unspotted. -- WBR, SD. ------------------------------------------------------------------------------ Put Bad Developers to Shame Dominate Development with Jenkins Continuous Integration Continuously Automate Build, Test & Deployment Start a new project now. Try Jenkins in the cloud. http://p.sf.net/sfu/13600_Cloudbees_APR Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel