#40 closed defect (fixed)
Memory management default callbacks
| Reported by: | Owned by: | eugene | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | PSLib SDRS | Version: | unspecified |
| Severity: | minor | Keywords: | |
| Cc: |
Description
In the SDR Rev. 01, paragraph 2.1.5 states, "The defaults for each of these
callbacks is NULL,". In the next paragraph 2.1.5.1 states, "the default
callback function(psMemExhaustedCallback) immediately returns NULL."
Is it desired to have these function pointers point to NULL initially and have
the user use the psCallbackSet routines to point to their callback functions or
should PSLib supply default callback functions that return with out doing
anything as in paragraph 2.1.5.1?
A problem could occur if callback event occurs without the user specifying a
callback function and there is no default callback function.
Change History (2)
comment:1 by , 22 years ago
| Status: | new → assigned |
|---|
comment:2 by , 22 years ago
| Resolution: | → fixed |
|---|---|
| Status: | assigned → closed |
after our discussions last week, i have changed the SDRS back to the original
(defined default callback functions psFooCallbackDefault) which get set
initially and reset by passing NULL to the CallbackSet function. I have also
described the use of these functions within the debugger as described by RHL.

from SDRS 00 to 01, I changed the default concept of the callback from a default
callback function whose behavior is to do nothing to having the callback
function set to NULL, in which case the calling function simply does not call
the callback. Paragraph 2.1.5.1 has an intermediate wording. I have changed
2.1.5.1 to say "Until the callback function is set with
'psMemExhaustedCallbackSet', or if this callback is set to NULL, 'psAlloc'
immediately calls 'psAbort'.