sizeof literal_t * is fixed, it is always 8 on 64bit machine, but the sizeof literal_t is not fixed. It depends up on those struct fields. I know you know more than meh. But why would i use literal_t *?
Lets think about that you are trying to allocate 2d array which pointers are indicated. So, first (literal_t*) shows that row count and second (literal_t) shows that column count. If one of them is missing, you cannot allocate exact memory that you want. Otherwise, such kind of memory is leaked in somewhere.
table->literals = (literal_t **)malloc(sizeof(literal_t *) * table_size); can solve the problem?
It depends on what is the problem? What do you want to solve?
It is all about hash table
This is understandable. Thanks for this
Обсуждают сегодня