Code Review, like all Stack Exchange sites, limits questions to a certain topic. As stated on our tour and on-topic pages, the goal of Code Review is to take working code and make it better. Your question was asking about how to fix broken code, and was thus off-topic. There is a link in the off-topic message giving some general advice about what to do for broken code.
To be more specific in your case, you have some significant compiler warnings, which you must have seen when you ran the compiler as you stated:
$ gcc -Wall -g -o iwlmem iwlmem.c
iwlmem.c: In function ‘getblksize’:
iwlmem.c:14: warning: format ‘%c’ expects type ‘int’, but argument 2 has type ‘char *’
iwlmem.c:14: warning: format ‘%8x’ expects type ‘unsigned int’, but argument 3 has type ‘char *’
iwlmem.c:14: warning: format ‘%8x’ expects type ‘unsigned int’, but argument 4 has type ‘char **’
iwlmem.c: In function ‘main’:
iwlmem.c:49: warning: initialization makes integer from pointer without a cast
iwlmem.c:55: warning: format ‘%x’ expects type ‘unsigned int’, but argument 2 has type ‘int *’
iwlmem.c:55: warning: format ‘%s’ expects type ‘char *’, but argument 4 has type ‘int’
I suggest that you start by fixing each of those problems first. Use Stack OverflowStack Overflow as a resource if you need help interpreting a particular type of compiler warning (but don't expect Stack Overflow to debug the entire program for you, if you ask the same question you asked here).