Ditch dlmalloc in favour of custom umalloc

This commit is contained in:
2025-09-27 22:32:38 +02:00
parent 3b1bb9d531
commit 8d081bedb0
13 changed files with 114 additions and 110 deletions

View File

@ -1,6 +1,6 @@
#include <stddef.h>
#include <string/string.h>
#include <dlmalloc/malloc.h>
#include <umalloc/umalloc.h>
size_t string_len(const char *s) {
size_t l = 0;
@ -140,7 +140,7 @@ char *string_tokenizealloc(char *s, char *delim) {
return NULL;
}
char *w = (char *)dlmalloc(sizeof(char) * STRING_TOKENIZEALLOC_TOK_SIZE);
char *w = (char *)umalloc(sizeof(char) * STRING_TOKENIZEALLOC_TOK_SIZE);
string_memset(w, 0, sizeof(char) * STRING_TOKENIZEALLOC_TOK_SIZE);
int i = curridx, k = 0, j = 0;