Skip to content

Commit dfa1809

Browse files
committed
fix malloc size inconsistency in first_fit.c
1 parent dc6fc15 commit dfa1809

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

first_fit.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ int main()
2727
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);
2828

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

0 commit comments

Comments
 (0)