wip: memory is almost fixed and working fine (infinite loop on zones linked lists)
This commit is contained in:
@ -11,7 +11,7 @@
|
||||
|
||||
// BPZ = Blocks Per Zone, which is the max
|
||||
// number of blocks for a new zone
|
||||
enum { BPZ = 128, PAGES_TINY = 16, PAGES_SMALL = 64, MEM_ALIGN = 4 };
|
||||
enum { BPZ = 128, PAGES_TINY = 16, PAGES_SMALL = 64, MEM_ALIGN = 8 };
|
||||
|
||||
typedef enum { TINY, SMALL, LARGE } block_type_t;
|
||||
|
||||
|
@ -4,8 +4,10 @@
|
||||
#include "kprintf.h"
|
||||
#include <stdint.h>
|
||||
|
||||
#define PRINT_PTR(X) kprintf("%s: %p\n", #X, X)
|
||||
#define PRINT_INT(X) kprintf("%s: %d\n", #X, X)
|
||||
#define PRINT_PTR(X) kprintf("%s:%u %s: %p\n", __FILE__, __LINE__, #X, X)
|
||||
#define PRINT_STR(X) kprintf("%s:%u %s: %s\n", __FILE__, __LINE__, #X, X)
|
||||
#define PRINT_UINT(X) kprintf("%s:%u %s: %u\n", __FILE__, __LINE__, #X, X)
|
||||
#define PRINT_INT(X) kprintf("%s:%u %s: %d\n", __FILE__, __LINE__, #X, X)
|
||||
#define assert(X) \
|
||||
do { \
|
||||
if (!(X)) { \
|
||||
|
@ -13,4 +13,4 @@
|
||||
#define KERN_DEBUG "8"
|
||||
|
||||
int kprintf(const char *restrict format, ...);
|
||||
int kvprintf(const char *restrict format, va_list ap);
|
||||
int kvprintf(const char *restrict format, va_list *ap);
|
||||
|
Reference in New Issue
Block a user