Skip to content

Commit

Permalink
fix malloc size inconsistency in first_fit.c
Browse files Browse the repository at this point in the history
  • Loading branch information
Kyle-Kyle committed Dec 2, 2019
1 parent dc6fc15 commit dfa1809
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion first_fit.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ int main()
fprintf(stderr, "We don't need to free anything again. As long as we allocate smaller than 0x512, it will end up at %p\n", a);

fprintf(stderr, "So, let's allocate 0x500 bytes\n");
c = malloc(506);
c = malloc(0x500);
fprintf(stderr, "3rd malloc(0x500): %p\n", c);
fprintf(stderr, "And put a different string here, \"this is C!\"\n");
strcpy(c, "this is C!");
Expand Down

0 comments on commit dfa1809

Please sign in to comment.