[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:
@@ -1,6 +1,7 @@
|
||||
#include <string.h>
|
||||
#include "kutil/assert.h"
|
||||
#include "kutil/memory.h"
|
||||
#include "kutil/no_construct.h"
|
||||
|
||||
#include "interrupts.h"
|
||||
#include "io.h"
|
||||
#include "serial.h"
|
||||
@@ -121,7 +122,7 @@ serial_port::do_write()
|
||||
if (n > fifo_size)
|
||||
n = fifo_size;
|
||||
|
||||
kutil::memcpy(tmp, data, n);
|
||||
memcpy(tmp, data, n);
|
||||
m_out_buffer.consume(n);
|
||||
|
||||
for (size_t i = 0; i < n; ++i)
|
||||
|
||||
Reference in New Issue
Block a user