Use a custom allocator for everything.

git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@3892 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
2022-06-04 17:04:51 +00:00
parent cf61e68713
commit 9c90b2bc1d
24 changed files with 404 additions and 343 deletions

View File

@ -1,11 +1,11 @@
#include "ssb.connections.h"
#include "mem.h"
#include "ssb.h"
#include <uv.h>
#include <sqlite3.h>
#include <malloc.h>
#include <string.h>
#if !defined(_countof)
@ -97,7 +97,7 @@ static void _tf_ssb_connections_timer(uv_timer_t* timer)
tf_ssb_connections_t* tf_ssb_connections_create(tf_ssb_t* ssb)
{
tf_ssb_connections_t* connections = malloc(sizeof(tf_ssb_connections_t));
tf_ssb_connections_t* connections = tf_malloc(sizeof(tf_ssb_connections_t));
memset(connections, 0, sizeof(*connections));
connections->ssb = ssb;
connections->db = tf_ssb_get_db(ssb);
@ -117,7 +117,7 @@ static void _tf_ssb_connections_on_handle_close(uv_handle_t* handle)
{
tf_ssb_connections_t* connections = handle->data;
handle->data = NULL;
free(connections);
tf_free(connections);
}
void tf_ssb_connections_destroy(tf_ssb_connections_t* connections)