> On Oct 2, 2014, at 2:13 AM, Daniel Fahlgren <[email protected]> wrote: > > Hi, > > On Wed, 2014-10-01 at 18:00 -0700, Anna Zaks wrote: >> + MOK_None, >> Do we need this one? > > No, that is a left over after some old code structure. Sorry. > >> + if (Family == AF_Malloc && CheckFree) { >> + if (Family == AF_Malloc && CheckAlloc) { >> >> A possible micro optimization would be to check the family once for the >> common two cases. Also, note that "ChecksEnabled[CK_MallocOptimistic]" >> most commonly evaluates to false. > >> if (Family == AF_Malloc) { >> if (CheckFree) { >> if () ... >> } else { >> assert(CheckAlloc); >> if () ... >> } >> if (!ChecksEnabled[CK_MallocOptimistic]) >> return false; >> } > > I've tried that but the amount of nested if-statements and conditions > looked too cluttered. Also that example is slightly wrong since in some > cases we wish do check for both Free and Allocate functions, not just > one kind. > >> Do you have commit access? > > No I do not, but perhaps it is time that I apply for it? >
I think your patches still need to go through pre-commit review, so we can just continue applying them. Please, send me the updated patch (with MOK_None removed) and I'll commit it. Thanks! Anna. > Cheers, > Daniel
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
