IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 1, 2011, 6:21:28 PM (15 years ago)
Author:
eugene
Message:

fix threading for psphotStack; use standard PS_ARGUMENTS_ macros for ppSub, ppStack, pswarp, ppImage, psphotStack; fix FPA.EXPOSURE in ppImageAddNoise; fix accounting for psf bad and poor weights; added flags for substantial poor masks due to each poor mask bit type; fix the measurement of the fwhm in pmPSFtoFWHM

Location:
branches/eam_branches/ipp-20110213/psLib/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20110213/psLib/src/sys/psMemory.c

    r30595 r30772  
    2727#include <string.h>
    2828#include <assert.h>
     29#include <unistd.h>
    2930
    3031#if defined(PS_MEM_BACKTRACE) && defined(HAVE_BACKTRACE)
     
    10901091    return (memBlock1->freeFunc == memBlock2->freeFunc);
    10911092}
     1093
     1094bool static dumpMemory = false;
     1095
     1096void psMemDumpSetState (bool state) {
     1097    dumpMemory = state;
     1098}
     1099
     1100void psMemDump(const char *name)
     1101{
     1102    if (!dumpMemory) return;
     1103
     1104    char filename[1024];          // don't make your sub-names too long!
     1105    static int num = 0;           // Counter, to make files unique and give an idea of sequence
     1106
     1107    snprintf (filename, 1024, "memdump_%s_%03d.txt", name, num);
     1108    FILE *memFile = fopen(filename, "w");
     1109
     1110    psMemBlock **leaks = NULL;
     1111    int numLeaks = psMemCheckLeaks(0, &leaks, NULL, true);
     1112    fprintf(memFile, "# MemBlock Size Source\n");
     1113    unsigned long total = 0;            // Total memory used
     1114    for (int i = 0; i < numLeaks; i++) {
     1115        psMemBlock *mb = leaks[i];
     1116        fprintf(memFile, "%12lu\t%12zd\t%s:%d\n", mb->id, mb->userMemorySize, mb->file, mb->lineno);
     1117        total += mb->userMemorySize;
     1118    }
     1119    fclose(memFile);
     1120    psFree(leaks);
     1121
     1122    fprintf(stderr, "Memdump %s %d: Memory use: %ld, sbrk: %p\n", name, num, total, (void *) sbrk(0));
     1123    num++;
     1124}
  • branches/eam_branches/ipp-20110213/psLib/src/sys/psMemory.h

    r26892 r30772  
    647647  );
    648648
     649void psMemDumpSetState (bool state);
     650void psMemDump(const char *name);
     651
    649652// Ensure this is a psLib pointer
    650653#define PS_ASSERT_PTR_HEAVY(PTR, RVAL) \
  • branches/eam_branches/ipp-20110213/psLib/src/types/psArguments.h

    r24143 r30772  
    8181 *  specific routine called pkgnameVersionLong() is presumed to exist.
    8282 */
    83 #define PSARGUMENTS_INSTANTIATE_GENERICS( pkgname, config, argc, argv )   \
     83#define PS_ARGUMENTS_GENERIC( pkgname, config, argc, argv )   \
    8484  { int N= psArgumentGet (argc, argv, "-version");                        \
    8585    if (N) {                                                              \
     
    115115 *  presumed to exist.
    116116 */
    117 #define PSARGUMENTS_INSTANTIATE_THREADSARG( pkgname, config, argc, argv )   \
     117#define PS_ARGUMENTS_THREADS( pkgname, config, argc, argv )   \
    118118  { int N= psArgumentGet(argc, argv, "-threads");                           \
    119119    if (N) {                                                                \
Note: See TracChangeset for help on using the changeset viewer.