2 Reusable Code Snippet Topics

Remove Filter
Member Avatar for
Member Avatar for thekashyap

This article shows you how to optimize memory allocations in C++ using placement new. Applicable especially to usecases dealing with creation of large number of objects. [COLOR="Red"][B]A brief on problem:[/B][/COLOR] Lets take example problem for simplicity: - I have a GSM network with a cell in it. - Cell's coverage …

Member Avatar for thekashyap
3
567
Member Avatar for Ancient Dragon

The idea for this came from another thread in the C++ forum that wanted to duplicate the _getdelim() function that is supported by GNU compilers g++. I made one major change in that this version does not allocate new memory every time it is called, which is grossly inefficient. Instead, …

Member Avatar for Ancient Dragon
2
311

The End.