nx
nx copied to clipboard
Crash fixes but slight omnibus
This refactor is aimed at fixing crashes found while testing the gpu-simple
example applet.
The following changes have been made:
- made the allocator thread safe using
linked_list_allocator
'sLockedHeap
. This uses a spinlock, so it should be refactored again at some point in the future as spinlocks are bad for performance under contention. - Changes a number of calls to
nx::alloc::{allocate, dealocate}
to usingGlobal
and theAllocator
API. This should allow easier refactoring to allow consumers to bring their own allocators - I even have a PoC in a branch of my fork. - Fixes a semi-RNG bug in the rust runtime that causes a link failure when two symbols are too far apart.
- Fix crashes due to memory handling errors in
gpu::Context
andsurface::Surface
where memory is handed to the kernel, and not reclaimed. - Add
viAddToLayerStack
because I need it for a project, but I added it first so it's a pain to remove. This can be cherry-picked out.