4 ms·
Except if the program needs to run for a non trivial duration or you need many instances of it at the same time/run at the same time as other processes. Still
by MichaelMoser123 10y ago
Except if the program needs to run for a non trivial duration or you need many instances of it at the same time/run at the same time as other processes.
Still you have obstacks where free is a no op - here you allocate off the stack (assuming that you dont need to store pointers after you are done). Ngnix and apache allocate a chunk of memory per connection and free it all when the connection is finished - but this results in high memory fragmentation, also this is not so good if connections take a long time.