// Simple memory manager in C
#define MEM_SIZE 1024
char memory[MEM_SIZE];

void *malloc(size_t size) {
    static size_t used = 0;
    if (used + size > MEM_SIZE) return NULL;  // Out of memory
    void *ptr = &memory[used];
    used += size;
    return ptr;
}

void free(void *ptr) {
    // Simple memory manager does not support free
}