SingingCat 0
application
multiram.h
1#ifndef MULTIRAM_H
2#define MULTIRAM_H 1
3#include "main-header.h"
4#include <ringbuffer.h>
5#include "command-handler.h"
6typedef struct mpm {
7 byte max_commands; /* commem is dynamic, might be reused for other stuff. track # of coms */
8 byte dalloc; /* is dynbuf allocated atm? */
9 struct comnode commem[50]; // max commands at any given time in ram
10 struct ringbuffer ringbuffer1;
11 struct ringbuffer ringbuffer2;
12 byte dynbuf[4096];
13} mpmem;
14
15void multi_mem_init();
16struct mpm *get_mpm();
17void *mpm_reserve(int bytes);
18void mpm_free(void *mem);
19int is_stack(void *mem);
20
21void *sc_realloc(void *ptr, size_t size);
22
23
24#endif
void * mpm_reserve(int bytes)
Definition: multiram.c:38
void mpm_free(void *mem)
Definition: multiram.c:48
void multi_mem_init()
called very early on, even before printf works
Definition: multiram.c:26
Definition: multiram.h:6