IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jan 2, 2008, 10:33:41 AM (18 years ago)
Author:
gusciora
Message:

Added pmMemCheck functions.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/camera/pmFPA.c

    r14933 r15973  
    271271}
    272272
     273bool psMemCheckReadout(psPtr ptr)
     274{
     275    PS_ASSERT_PTR(ptr, false);
     276    return ( psMemGetDeallocator(ptr) == (psFreeFunc) readoutFree);
     277}
     278
     279
    273280pmCell *pmCellAlloc(
    274281    pmChip *chip,
    275     const char *name
    276 )
     282    const char *name)
    277283{
    278284    pmCell *tmpCell = (pmCell *) psAlloc(sizeof(pmCell));
     
    301307}
    302308
     309bool psMemCheckCell(psPtr ptr)
     310{
     311    PS_ASSERT_PTR(ptr, false);
     312    return ( psMemGetDeallocator(ptr) == (psFreeFunc) cellFree);
     313}
     314
     315
    303316pmChip *pmChipAlloc(
    304317    pmFPA *fpa,
     
    334347}
    335348
     349bool psMemCheckChip(psPtr ptr)
     350{
     351    PS_ASSERT_PTR(ptr, false);
     352    return ( psMemGetDeallocator(ptr) == (psFreeFunc) chipFree);
     353}
     354
    336355pmFPA *pmFPAAlloc(const psMetadata *camera)
    337356{
     
    347366
    348367    tmpFPA->analysis = psMetadataAlloc();
    349     tmpFPA->camera = psMemIncrRefCounter((psPtr)camera);
     368    tmpFPA->camera = psMemIncrRefCounter((psPtr) camera);
    350369    tmpFPA->chips = psArrayAlloc(0);
    351370    tmpFPA->hdu = NULL;
     
    357376    return tmpFPA;
    358377}
     378
     379bool psMemCheckFPA(psPtr ptr)
     380{
     381    PS_ASSERT_PTR(ptr, false);
     382    return ( psMemGetDeallocator(ptr) == (psFreeFunc) FPAFree);
     383}
     384
    359385
    360386// Check a cell to ensure that all component readouts have the parent pointer set correctly
     
    402428psBool pmFPACheckParents(pmFPA *fpa)
    403429{
    404     PS_ASSERT_PTR_NON_NULL(fpa, true);
     430    PS_ASSERT_PTR_NON_NULL(fpa, false);
    405431
    406432    bool flag = true;
Note: See TracChangeset for help on using the changeset viewer.