Values in heap4 space

pvPortMalloc will allocate the number of bytes requested, rounded up to the alignment value, plus it adds a header before the return block to provide information for pvPortFree(). I don’t know why you say it allocates 4 bytes at a time, it typically allocates in units of 4 bytes on many processors, but one allocation can use many units.

I would use memset to clear the memory, and it can clear as much of the buffer as you allocated.