home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-09-28 | 2.5 KB | 60 lines | [TEXT/ttxt] |
- SmartHeap
- If you use MicroQuill's SmartHeap product then defining OOF_SmartHeap
- will include smrtheap.hpp and perform pool validation at selected points
- to aid in detecting bugs such as memory overwrites. This runs a LOT
- slower but provides a high degree of assurance.
-
-
- OOF Debug Notes
-
- -=-=-=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- OVERVIEW
-
- OOF_Debug is a flag, that will turn on debugging modes within OOFILE. These are
- in the nature of development-time checks and should not be left in released
- applications! However, the errors they trigger will be handled by the standard
- error handler (dbConnect::raise), so you could theoretically cope with them
- yourself. Most of the OOF_Debug errors are programmer errors, and it should not
- be relied on as (say) a range-checking recovery mechanism.
-
-
- -=-=-=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- CATCHING MISSING PARENS ON RELATED FIELDS
- We use operator() on fields at the end of a relation chain to force immediate
- evaluation of the relation chain (which has been stashed in a global variable).
-
- The danger exists that the user can forget these parents. ie:
- People.Visits->Date() vs
- People.Visits->Date // whoops!
-
- The latter Date field would come from the current selection in Visits, not
- People->Visits.
-
- Every operation on a field checks to see if the chain setup by Visits-> has
- been consumed, and triggers an error at that point - immediately after the
- failure to include the paren, so it should be easy to spot.
-
-
- -=-=-=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- OVERRUNS ON OOF_DICTIONARY
- If you write to an unallocated cell that is more than one past the previous
- high point (ie: not just an append) then OOF_DictRep::operator[](long) will
- report the error. This catches problems such as incorrect copying of objects
- (mainly our mistakes) or scrambling memory so that the index being used on
- the dictionary is a ridiculous value.
-
-
- -=-=-=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- RANGE ERRORS ON NUMERIC FIELDS
- Conversion from a double to a long, or short and conversion from a long to a
- short are range-checked when the fields are assigned a value.
-
-
- -=-=-=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- INAPPROPRIATE ACTIONS LOCKED
- Attempting to add a record while read-locked will raise an error
-
- Attempts to set a read lock whilst write-locked and vice versa will raise
- an error, as will failing to match the number of ApplyLock calls to
- ReleaseLock's.
-