Hey guys... general question here... if I allocate a block of memory with...
unsigned short int* memBlock = (unsigned short int*)malloc(mbSize);
What would be the FASTEST way to clear said block of memory? Not deallocate it, but write all 0's to it (or some arbitrary value, but 0 is what I'm thinking).
I'm assuming that...
for (int i = 0; i < mbSize; i++) {
*(memBlock + i) = 0;
}
..would NOT be the fastest way, right?
Thanks all!