Purify tends to get confused because of the threads package used in Shore, and also because "uninitialized" data is sometimes "read" in a DBMS in order to be written. A sample ".purify" suppressions file is in the top-level "utils" directory of the release, and this reduces some of the warnings. You then have an option: you can either compile Shore with the USE_PURIFY flag --- this eliminates some of Purify's confusion. Optionally, you can pipe the output of the Purify'ed server through the "disinfect" script (which is also in the top-level "utils" directory). This removes many spurious messages. However, using this approach precludes the use of the graphical Purify interface. Instead, you should set something like the following in your .cshrc.
We have lacked the time to fully remove memory leaks, but this is a process that we are gradually undertaking.setenv PURIFYOPTIONS "-output-limit=100000 -free-queue-length=500 -chain-length=10 -cache-dir=/home/praveen/purifycache -always-use-cache-dir=yes -windows=no -ignore-signals=0xffffffff -handle-signals=0x00000400" setenv QUANTIFYOPTIONS "-cache-dir=/home/praveen/qfycache -always-use-cache-dir=yes"
No code should be added to the PREDATOR codebase without accompanying documentation. The conventions below must be followed to insure uniform results.
All comments associated with a specific declaration, e.g., class, must preceed the declaration. Those that follow it (including those on the same line) will be associated with the next declaration.
Before checking in your code, insure that the documentation generated for your code is comprehensible and explicit.
Things to note about the comment:/** * [Memo]. (optional) * [Documentation] * @see [Related classes, topics, etc.] (optional) * @author [Your name and e-mail address] (optional) * @version [The date the code was checked in, e.g., June 1, 1997] (optional) */ class Foo : public Bar { ... };
/** * The parse structure for functions over audio types. This class * encapsulates all the necessary information to parse an expression over * an audio object, including the ID of the method and any catalog * information required. * @see XxxFuncParseInfo, XxxAudioADT * @author Leong Kian Fai * @version June 1, 1997 */ class ParseInfo : public XxxFuncParseInfo { ... }
If the presence of /// messes up the autoindent on your editor, try //// instead -- this usually works fine. Comments which are on the same line, e.g.,/// The method ID of the method relevant to this structure AudioMethType MethType;
will not be properly processed.AudioMethType MethType; /// The method ID of the method
If a data member requires more documentation than can be written on a single line, you may use the /** ... */ format; for example:
/** * The method ID of the method relevant to this structure. It is important * to note that the value UNDEFINED will cause mass destruction, and its * use should be disallowed. */ AudioMethType MethType;
Things to note about the comment:/** * [Memo]. * [Documentation] * @param param1 [Description of what param1 is] * [...] * @param paramn [Description of what paramn is] * @return [Description of return value] */ XxxErrCode FooBar (int param1, ..., int paramn);
/** * Action for the vibro-volume merge rule. * This is the action performed when the vibro-volume merge rule is * applied. It transforms the two expressions into an equivalent * single expression. * @param InVExpr The incoming expression * @param RuleData Any data passed in by the rule firing * @param OutVExpr The resultant expression * @return The status code. */ static XxxErrCode VibroVolumeMergeAct(XxxValueExpression* InVExpr, void* RuleData, XxxValueExpression*& OutVExpr);
in your $XXXROOT directory.make doc
Instead, use:class Foo { public: .... };
class Foo { public: .... };