What is the right and best way to reallocate memory? for example I allocate 100 bytes with WinAPI function HeapAlloc then I fill 100 bytes of that memory with some data and now I want to add more new data at end of previous...
What Should I do? Make a new allocation with more bytes and then copy old+new to new location and free old memory? Or there is some way to allocate new memory at end of old data and then copy only new data?