Skip to content

Instantly share code, notes, and snippets.

@abouteiller
abouteiller / shmem-multi-heaps.md
Last active February 19, 2026 18:20
Mockup shmem-multi-heaps

Goal

grandfather existing implementation behavior for applications coming from both gpu-centric and cpu-centric.

  1. If an implementation had been traditionally cpu-centric, existing code should continue to work (and use the CPU heap)
  2. If an implementation had been traditionally gpu-centric, existing code should continue to work (and use the GPU heap)
  3. A (new) mechanism should be available for advanced users to control what heap they malloc from
  4. A (new) mechanism should be available for advanced users to query what type of heap they allocated from

Idea