49 L
"make_vec_pointer: tag written, about to set pointer address to %p\n",
52 cell->
payload.vectorp.address = address;
56 L
"make_vec_pointer: all good, returning pointer to %p\n",
57 cell->
payload.vectorp.address );
82 uint64_t padded = ceil( ( total_size * 8.0 ) / 8.0 );
87 memset( vso, 0, padded );
91 L
"make_vso: written tag '%4.4s' into vso at %p\n",
102 L
"Allocated vector-space object of type %4.4s, total size %ld, payload size %ld, at address %p, payload address %p\n",
105 if ( padded != total_size ) {
107 total_size, padded );
113 L
"make_vso: all good, returning pointer to %p\n",
127 cell.
payload.vectorp.address );
141 cell.
payload.vectorp.address );
struct cons_pointer allocate_cell(uint32_t tag)
Allocates a cell with the specified tag.
#define VECTORPOINTTV
The string VECP, considered as an unsigned int.
union cons_space_object::@2 tag
union cons_space_object::@3 payload
#define NIL
a cons pointer which points to the special NIL cell
#define pointer2cell(pointer)
given a cons_pointer as argument, return the cell.
An indirect pointer to a cons cell.
void debug_dump_object(struct cons_pointer pointer, int level)
Like dump_object, q.v., but protected by the verbosity mechanism.
void debug_printf(int level, wchar_t *format,...)
wprintf adapted for the debug logging system.
void debug_print(wchar_t *message, int level)
print this debug message to stderr, if verbosity matches level.
#define DEBUG_ALLOC
Print messages debugging memory allocation.
void free_hashmap(struct cons_pointer pointer)
Free the hashmap indicated by this pointer.
struct stack_frame * get_stack_frame(struct cons_pointer pointer)
get the actual stackframe object from this pointer, or NULL if pointer is not a stackframe pointer.
void free_stack_frame(struct stack_frame *frame)
Free this stack frame.
struct cons_pointer make_vec_pointer(struct vector_space_object *address, uint32_t tag)
Make a cons_space_object which points to the vector_space_object with this tag at this address.
void free_vso(struct cons_pointer pointer)
for vector space pointers, free the actual vector-space object.
struct cons_pointer make_vso(uint32_t tag, uint64_t payload_size)
Allocate a vector space object with this payload_size and tag, and return a cons_pointer which points...
union vector_space_object::@5 payload
we'll malloc size bytes for payload, payload is just the first of these.
struct vector_space_header header
the header of this object
struct cons_pointer vecp
back pointer to the vector pointer which uniquely points to this vso
union vector_space_header::@4 tag
the tag (type) of this vector-space object.
uint64_t size
the size of my payload, in bytes
a vector_space_object is just a vector_space_header followed by a lump of bytes; what we deem to be i...