Open Juliasunn opened 3 months ago
Create an Allocator class for allocating memory for buffers in ObjectPool:
- multipart/form-data buffer (body is char *)
- LoadMediaHandler: response<http::string_body> buffer (body is std::string)
Example of ObjectPool implementation: https://gist.github.com/Gerold103/0199ac4c2facc2b34ef25f8ea44a0601
The directions that affect server perfomanct are:
Heap memory allocations are time-expensive and lead to fragmentstion Solutions:
What is allocated on heap? Everything that is constructed using std::make shared/unique/etc ... (Handlers, )