We should really be using size_t for size in C code instead of the regular int