2 ms·
calloc doesn't know what it's allocating for, so it has to hand out m * n. (Despite the syntax, the same goes for operator new in C++! Placement vector new in
by to3m 10y ago
calloc doesn't know what it's allocating for, so it has to hand out m * n.
(Despite the syntax, the same goes for operator new in C++! Placement vector new in particular is a trap.)