3 ms·
What do you mean by zero memory allocation? The title seems contradictory. You have to allocate at least some memory for a program to run. Do you mean it doesn
by jjbiotech 12y ago
What do you mean by zero memory allocation? The title seems contradictory. You have to allocate at least some memory for a program to run.
Do you mean it doesn't allocate any memory per request, it just uses pre allocated memory?
- gilini 12y agoYeah, seems like a sensationalist title tbh. The project README doesn't giving any info to support that claim as well. It doesn't make any sense.
- ComputerGuru 12y agoThat's standard terminology in libraries, especially in parsers. You don't really care about overhead memory, you're concerned with scaling one the requests start coming in. With things like C-based HTTP or JSON parsers, they will use the same memory space that is being passed to them to par/lex/etc but in this case with a Go library I'm honestly not sure what To does behind the scenes (I haven't looked at the source).
- m0th87 12y agoI thought it meant that they were only allocating on the stack instead of the heap, (which would still be wrong terminology-wise) but they're clearly doing heap allocations from the examples: https://github.com/labstack/echo/blob/master/example/main.go https://github.com/labstack/echo/blob/master/example/main.go
- sctb 12y agoWe removed "with zero memory allocation" from the title, because it may be misleading.
- JulianMorrison 12y ago"Constant space" and "zero garbage" perhaps?
- noselasd 12y agoHe means zero _dynamic_ memory allocation.