nx icon indicating copy to clipboard operation
nx copied to clipboard

Crash fixes but slight omnibus

Open pantsman0 opened this issue 6 months ago • 0 comments

This refactor is aimed at fixing crashes found while testing the gpu-simple example applet.

The following changes have been made:

  1. made the allocator thread safe using linked_list_allocator's LockedHeap. This uses a spinlock, so it should be refactored again at some point in the future as spinlocks are bad for performance under contention.
  2. Changes a number of calls to nx::alloc::{allocate, dealocate} to using Global and the Allocator 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.
  3. Fixes a semi-RNG bug in the rust runtime that causes a link failure when two symbols are too far apart.
  4. Fix crashes due to memory handling errors in gpu::Context and surface::Surface where memory is handed to the kernel, and not reclaimed.
  5. 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.

pantsman0 avatar Aug 24 '24 04:08 pantsman0