Relative Content

Tag Archive for c++memorymemory-managementrealloc

Is it efficient to use realloc to free up small chunks of memory C++ [duplicate]

This question already has answers here: Using realloc to shrink the allocated memory (5 answers) Closed 14 days ago. I’m writing an application that generates a bunch of n strings (bit)length l and then does a comparison between all possible pairs. I first allocate memory for n strings of length l char* pStr = (char*)(malloc(n […]