Code review comment for lp:~epics-core/epics-base/ioc-shutdown2

Revision history for this message
Andrew Johnson (anj) wrote :

On 07/11/2014 04:06 PM, mdavidsaver wrote:
> Ok, thats it. Barring bugs or futher requests, this is done.

The dbLockCleanupRecords() routine looks a little strange; it appears to
call free() once, on prec->lset of first record of the /second/ record
type. Now I know that dbLockInitRecords() only calls dbCalloc() once, so
all of the lockRecord (prec->lset) objects get allocated in a single
block, but the address of that big block is going to be the first record
instance of the first record type that actually has any records loaded.
I think you still need to loop through the record types, but you can
exit it as soon as you find the first record instance.

It seems to me that dbLockCleanupRecords() should also be emptying the
lockSetList[] lists, which contain lockSet objects. I admit I have no
idea what the differences are between the three different lists, but I
can see that there are calls to dbCalloc() in dbLock.c that don't appear
to an have associated call to free() anywhere.

> I decided to include dbPutLinkTest, which is stripped down since
> testing of CA links won't work yet. dbCa isn't being initialized,
> and probably shouldn't be as this will start a CA client.

That's fine. There are several input links in dbCommon.dbd that you
could have used for testing (e.g. SDIS) though, you didn't have to add
another link to the xRecord type.

- Andrew
--
Advertising may be described as the science of arresting the human
intelligence long enough to get money from it. -- Stephen Leacock

« Back to merge proposal