IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Nov 27, 2019, 11:06:01 AM (6 years ago)
Author:
eugene
Message:

improved memory check functions; ## and ### added as allowed comments

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/opihi/cmd.basic/memory.c

    r14177 r41160  
    55 
    66  if (argc < 2) goto usage;
     7
     8  if (!strcasecmp (argv[1], "max-lines")) {
     9    if (argc != 3) goto usage;
     10    int MaxLines = atoi(argv[2]);
     11    ohana_memdump_set_maxlines (MaxLines);
     12    return TRUE;
     13  }
    714
    815  if (!strcasecmp (argv[1], "all")) {
     
    4350  }
    4451
     52  if (!strncasecmp ("strings", argv[1], strlen(argv[1]))) {
     53    ohana_memdump_strings_file (stderr, FALSE);
     54    return (TRUE);
     55  }
     56
    4557usage:
    46   gprint (GP_ERR, "USAGE: memory (all/leaks)\n");
     58  gprint (GP_ERR, "USAGE: memory (mode) [-max-lines]\n");
     59  gprint (GP_ERR, "USAGE: memory (max-lines) (N)\n");
     60  gprint (GP_ERR, " mode options: all, leaks, check, checkfree, variables, vectors, buffers, macros, commands, strings\n");
    4761  return (FALSE);
    4862}
Note: See TracChangeset for help on using the changeset viewer.