IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 15718


Ignore:
Timestamp:
Nov 29, 2007, 2:40:37 PM (18 years ago)
Author:
eugene
Message:

init name, add apis to report / reset allocs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/opihi/dvo/dbStackMath.c

    r13479 r15718  
    11# include "dvoshell.h"
     2
     3static int NallocBinary = 0;
     4static int NallocUnary = 0;
    25
    36dbStack *dbBinary (dbStack *V1, dbStack *V2, char *op, float *fields) {
     
    2124  }
    2225
     26  NallocBinary ++;
    2327  ALLOCATE (OUT, dbStack, 1);
    2428  OUT->type = 'T';
     29  OUT->name = NULL;
    2530
    2631  // use an enum for the op...
     
    100105  }
    101106 
     107  NallocUnary ++;
    102108  ALLOCATE (OUT, dbStack, 1);
    103109  OUT->type = 'T';
     110  OUT->name = NULL;
    104111
    105112  if (!strcmp (op, "="))      {   OUT->Float = M1;                 }
     
    139146  return (OUT);
    140147}
     148
     149int dbStackAllocPrint () {
     150
     151  fprintf (stderr, "dbAllocBinary: %d\n", NallocBinary);
     152  fprintf (stderr, "dbAllocUnary:  %d\n", NallocUnary);
     153  return (TRUE);
     154}
     155
     156int dbStackAllocReset () {
     157
     158  NallocBinary = 0;
     159  NallocUnary = 0;
     160  return (TRUE);
     161}
Note: See TracChangeset for help on using the changeset viewer.