Skip to content

Instantly share code, notes, and snippets.

@harlanhaskins
Created January 20, 2015 18:58
Show Gist options
  • Save harlanhaskins/90c4d7feb362f0252278 to your computer and use it in GitHub Desktop.
Save harlanhaskins/90c4d7feb362f0252278 to your computer and use it in GitHub Desktop.
harlan@durant ~/B/C> valgrind ./BogoSort -n 10 -s
==29299== Memcheck, a memory error detector
==29299== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
==29299== Using Valgrind-3.9.0 and LibVEX; rerun with -h for copyright info
==29299== Command: ./BogoSort -n 10 -s
==29299==
[38, 89, 25, 84, 30, 4, 71, 84, 7, 46]
[4, 7, 25, 30, 38, 46, 71, 84, 84, 89]
It took me 00:00:12.591712 to BogoSort this list.
I shuffled it 790,612 times.
==29299==
==29299== HEAP SUMMARY:
==29299== in use at exit: 0 bytes in 0 blocks
==29299== total heap usage: 20 allocs, 20 frees, 3,737 bytes allocated
==29299==
==29299== All heap blocks were freed -- no leaks are possible
==29299==
==29299== For counts of detected and suppressed errors, rerun with: -v
==29299== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 2 from 2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment