mirror of
https://github.com/AsahiLinux/m1n1
synced 2024-12-25 12:43:05 +00:00
986c6730e9
heapblock is a simple `sbrk` style implementation, also useful as an "endless" decompression buffer. dlmalloc is used on top as a malloc implementation. This also changes how the Python side manages its heap. We still use a python-side malloc implementation (since this is faster), and we put the Python heap at the m1n1 heap + 128MB, without allocating it. Hopefully this should never step on anything m1n1 neads, and avoids having to manage freeing across Python script calls. Signed-off-by: Hector Martin <marcan@marcan.st>
13 lines
227 B
C
13 lines
227 B
C
/* SPDX-License-Identifier: MIT */
|
|
|
|
#ifndef HEAPBLOCK_H
|
|
#define HEAPBLOCK_H
|
|
|
|
#include "types.h"
|
|
|
|
void heapblock_init(void);
|
|
|
|
void *heapblock_alloc(size_t size);
|
|
void *heapblock_alloc_aligned(size_t size, size_t align);
|
|
|
|
#endif
|