Got most of the new memory architecture roughed out.

This commit is contained in:
Simon Brooke 2026-03-25 11:24:33 +00:00
parent 19d6b0df29
commit 604fca3c24
36 changed files with 1118 additions and 0 deletions

40
src/c/memory/header.h Normal file
View file

@ -0,0 +1,40 @@
/**
* memory/header.h
*
* Header for all page space objects
*
* (c) 2026 Simon Brooke <simon@journeyman.cc>
* Licensed under GPL version 2.0, or, at your option, any later version.
*/
#ifndef __psse_memory_header_h
#define __psse_memory_header_h
#include <stdint.h>
#define TAGLENGTH 3
/**
* @brief Header for all paged space objects.
*
*/
struct pso_header {
union {
/** the tag (type) of this cell,
* considered as bytes */
struct {
/** mnemonic for this type; */
char mnemonic[TAGLENGTH];
/** sizetag for this object */
uint8_t sizetag;
} tag;
/** the tag considered as a number */
uint32_t value;
} tag;
/** the count of the number of references to this cell */
uint32_t count;
/** cons pointer to the access control list of this cell */
struct cons_pointer access;
};
#endif