Slon/Modules/Http: Add mem_task to SlonHttpSession
We should be using the CHeapCtrl from the Spawned @slon_http_task to allocate memory for each individual session, which will automatically be freed when the CTask dies, so let's give ourselves the ability to do that.
This commit is contained in:
parent
e982c9584a
commit
08579df0b8
2 changed files with 2 additions and 0 deletions
|
@ -81,6 +81,7 @@ SlonHttpResponse* @slon_http_init_response(SlonHttpSession* session)
|
|||
SlonHttpSession* @slon_http_init_session(TcpSocket* s)
|
||||
{
|
||||
SlonHttpSession* session = CAlloc(sizeof(SlonHttpSession), slon_mem_task);
|
||||
session->mem_task = Fs;
|
||||
session->bytes_used = MSize2(session);
|
||||
session->s = s;
|
||||
session->request = @slon_http_init_request(session);
|
||||
|
|
|
@ -78,6 +78,7 @@ class SlonHttpResponse {
|
|||
|
||||
class SlonHttpSession {
|
||||
U64 s;
|
||||
CTask* mem_task;
|
||||
SlonHttpRequest* request;
|
||||
SlonHttpResponse* response;
|
||||
I64 bytes_used;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue