reswitched/libtransistor

Type-5 Page Allocation

misson20000 opened this issue · 0 comments

The lack of having a way to allocate contiguous type-5 memory is now blocking a number of hacks.

The proposed API is to pass a function pointer in libtransistor_context for void *(*alloc_pages)(size_t min, size_t max, size_t *actual). For allocations such as those listed above, min would equal max. For allocating space for the heap, min can be 0x1000 so that we can allocate any small blocks that may exist, since we're going to be mapping them anyway and can't use them for much else.