SdsCheck - Check for failures to run SdsFreeId().

Function

Check for failures to run SdsFreeId().

Description

SdsCheckInit() and SdsCheck() are usefull when checking for SDS ID leaks. What you should do is bracket a bunch of calls to SDS which are expected to not result in a net allocation of SDS ID's by SdsCheckInit() and SdsCheck().

Invoke this function with the chkData structure returned by a previous call to SdsCheckInit(). This function will then determine if there has been any net change in the number of SDS identifiers outstanding since that call to SdsCheckInit().

If a problem occurs, then status is set bad and a message is output to stderr indicating details of the problem.

Note - function checks for any net change in SDS ids - reduction or increase in number of ID's outstadning.

Language

C

Declaration

void SdsCheck(char *mes, SdsCheckType *chkData, StatusType * SDSCONST status)

Parameters

(">" input, "!" modified, "W" workspace, "<" output)

>mesconst char *Used in a mesage output. If non-zero, A message is output to stderr contianining this string.
!chkDataconst SdsCheckType *Check initialisation data checked against. The leakCount item in this structure will be updated with the number of SDS ID's which leaks. This value will be negative if ID's were released.
!statusStatusType*Modified status. Possible failure codes are:

SDS__CHK_LEAK The outstanding number of SDS id's has increased.
SDS__CHK_RELEASED The outstanding num of SDS id's dropped.

Support

Tony Farrell, {AAO}

Version date

25-Sep-2008

Click here for the DRAMA home page and here for the AAO home page.

 For more information, contact tjf@aao.gov.au