Skip to content

Commit

Permalink
Fixed handling of the head=numbytes argument in the snoopsharedmem tool
Browse files Browse the repository at this point in the history
  • Loading branch information
jfriesne committed Jun 21, 2024
1 parent 66c1fed commit d52d9f4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions HISTORY.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ key: - new feature
to enforce memory-safery, instead of just being a macro.
* Added a work-around to Hashtable.h to avoid a spurious compile-time
error regarding std::atomic under MSVC2017 and earlier.
* Fixed handling of the head=numbytes argument in the snoopsharedmem tool.

9.37 - Released 5/2/2024
- Implemented the ustar extension in TarFileWriter to support file paths
Expand Down
8 changes: 6 additions & 2 deletions tools/snoopsharedmem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,12 @@ int snoopsharedmemmain(const Message & args)


const char * maxBytesStr = args.GetCstr("head");
const uint32 maxBytes = maxBytesStr ? atol(maxBytesStr) : MUSCLE_NO_LIMIT;
if (maxBytes != MUSCLE_NO_LIMIT) LogTime(MUSCLE_LOG_INFO, "Limiting printouts to the first " UINT32_FORMAT_SPEC " bytes of the shared memory area.\n", maxBytes);
const uint32 maxBytesArg = maxBytesStr ? atol(maxBytesStr) : MUSCLE_NO_LIMIT;
if (maxBytesArg != MUSCLE_NO_LIMIT)
{
maxBytesToPrint = muscleMin(maxBytesToPrint, maxBytesArg);
LogTime(MUSCLE_LOG_INFO, "Limiting printouts to the first " UINT32_FORMAT_SPEC " bytes of the shared memory area.\n", maxBytesToPrint);
}

const bool isClear = args.HasName("clear");
if (isClear) LogTime(MUSCLE_LOG_INFO, "Will zero out the shared memory region after printing it\n");
Expand Down

0 comments on commit d52d9f4

Please sign in to comment.