N
Navaneeth
My application will be looping for 5000 times. On each iteration, it
has to create a string and pass that into other methods for
processing. This string length will only be known at the runtime.
So in each iteration, this is what happens.
ptr = malloc
process(ptr)
free(ptr)
I am wondering doing frequent malloc and free is ok? Will this
fragment the memory?
My development environment is GCC and Linux. But I'd be happy to know
about the implementation in windows also.
has to create a string and pass that into other methods for
processing. This string length will only be known at the runtime.
So in each iteration, this is what happens.
ptr = malloc
process(ptr)
free(ptr)
I am wondering doing frequent malloc and free is ok? Will this
fragment the memory?
My development environment is GCC and Linux. But I'd be happy to know
about the implementation in windows also.