Memory ReAllocation
        Posted  
        
            by davispuh
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by davispuh
        
        
        
        Published on 2010-06-13T13:05:14Z
        Indexed on 
            2010/06/13
            13:12 UTC
        
        
        Read the original article
        Hit count: 316
        
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?
© Stack Overflow or respective owner