[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:
@@ -3,7 +3,7 @@
|
||||
/// PCI devices and groups
|
||||
|
||||
#include <stdint.h>
|
||||
#include "kutil/memory.h"
|
||||
#include "memory.h"
|
||||
|
||||
struct pci_group;
|
||||
enum class isr : uint8_t;
|
||||
@@ -126,7 +126,7 @@ struct pci_group
|
||||
/// \returns A pointer to the memory-mapped configuration registers
|
||||
inline uint32_t * base_for(uint8_t bus, uint8_t device, uint8_t func)
|
||||
{
|
||||
return kutil::offset_pointer(base,
|
||||
return offset_pointer(base,
|
||||
pci_device::bus_addr(bus, device, func) << 12);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user