[kernel] Move more from kutil to kernel

The moving of kernel-only code out of kutil continues. (See 042f061)
This commit moves the following:

- The heap allocator code
- memory.cpp/h which means:
  - letting string.h be the right header for memset and memcpy, still
    including an implementation of it for the kernel though, since
    we're not linking libc to the kernel
  - Changing calls to kalloc/kfree to new/delete in kutil containers
    that aren't going to be merged into the kernel
- Fixing a problem with stdalign.h from libc, which was causing issues
  for type_traits.
This commit is contained in:
Justin C. Miller
2022-01-01 23:23:51 -08:00
parent 4d5ed8157c
commit a6ec294f63
29 changed files with 116 additions and 123 deletions

View File

@@ -1,6 +1,7 @@
#include <string.h>
#include "kutil/assert.h"
#include "kutil/constexpr_hash.h"
#include "kutil/memory.h"
#include "printf/printf.h"
#include "logger.h"
@@ -15,9 +16,6 @@ namespace logs {
namespace log {
using kutil::memset;
using kutil::memcpy;
logger *logger::s_log = nullptr;
const char *logger::s_level_names[] = {"", "debug", "info", "warn", "error", "fatal"};