Skip to content

Instantly share code, notes, and snippets.

@kostyll
Forked from hanshoglund/memdump.c
Created September 30, 2016 06:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kostyll/e1294c59966ab21cb7dc179c21e653b2 to your computer and use it in GitHub Desktop.
Save kostyll/e1294c59966ab21cb7dc179c21e653b2 to your computer and use it in GitHub Desktop.
C memdump
void memdump(void* s, size_t n)
{
for (size_t i = 0; i < n; ++i)
printf("%x ", *((unsigned char*) (s + i)) );
printf("\n");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment