|
|
|
|
|
by masklinn
4037 days ago
|
|
And you really shouldn't use it with a type if you can avoid it anyway, it makes code brittle e.g. int *foo;
// code
foo = malloc(sizeof(int));
a few months later, change foo to be a double. Code still compiles, no warning, but you're allocating half the memory you need. |
|