db_tutorial
db_tutorial copied to clipboard
Part 3: Too few arguments for calloc
Looks like a second argument is required for calloc. In the tutorial, we have:
Table* table = calloc(sizeof(Table));
which results in a compilation error:
main.c:96:38: error: too few arguments to function call, expected 2, have 1
Table* table = calloc(sizeof(Table));
~~~~~~ ^
I think it should be changed to:
Table* table = calloc(sizeof(Table), TABLE_MAX_PAGES * PAGE_SIZE);