Move string functions/utils from HAL to std/string

This commit is contained in:
2025-11-11 19:54:09 +01:00
parent f5dae4984d
commit 344952fb5f
27 changed files with 200 additions and 228 deletions

View File

@ -9,6 +9,7 @@
#include "pmm/pmm.h"
#include "malloc.h"
#include "bootinfo/bootinfo.h"
#include "std/string.h"
#define USE_DL_PREFIX 1
#define LACKS_SYS_TYPES_H 1
@ -67,7 +68,7 @@ void *sbrk(long inc) {
uint64_t blocks = _DIV_ROUNDUP(inc, BITMAP_BLOCK_SIZE);
uint8_t *virt = VIRT(pmm_alloc(blocks));
hal_memset(virt, 0, blocks * BITMAP_BLOCK_SIZE);
memset(virt, 0, blocks * BITMAP_BLOCK_SIZE);
_last = (void *)(virt + inc);
return virt;
}