Added debug messages to initialisation functions, but getting a segfault.

Not going to debug that tonight!
This commit is contained in:
Simon Brooke 2026-04-16 00:22:24 +01:00
parent f751fc8a09
commit 25c87aac6e
4 changed files with 29 additions and 1 deletions

View file

@ -10,6 +10,8 @@
#include <stdbool.h>
#include <stdio.h>
#include "debug.h"
#include "memory/memory.h"
#include "memory/node.h"
#include "memory/pointer.h"
@ -47,12 +49,15 @@ struct pso_pointer initialise_memory( uint32_t node ) {
if ( memory_initialised ) {
result =
make_exception( c_string_to_lisp_string
( L"Attenpt to reinitialise environment" ), nil,
( L"Attenpt to reinitialise memory." ), nil,
nil );
} else {
for ( uint8_t i = 0; i <= MAX_SIZE_CLASS; i++ ) {
freelists[i] = nil;
}
#ifdef DEBUG
debug_print(L"Memory initialised", DEBUG_BOOTSTRAP, 0);
#endif
memory_initialised = true;
}