mirror of
https://github.com/zeronsh/comet.git
synced 2026-11-16 18:57:19 +00:00
mimalloc v2 maps its regions with the VM tag in its os_tag option, 100 by default (options.c:147, prim/unix/prim.c:307), and on macOS tag 100 is VM_MEMORY_IOACCELERATOR. footprint, vmmap and Activity Monitor showed the whole Rust heap of the app and the background engine as GPU memory: a live engine read "819 MB IOAccelerator" for what was its own heap, and its purged pages as 4.5 GB of reclaimable GPU memory. An A/B on an isolated engine with a known 256 MiB allocation moved all of it from tag 100 to tag 254 with the same footprint. The global allocator now sets os_tag to 254 (Apple's application range, mimalloc's own fallback) before its first allocation, so the heap reads as "Memory Tag 254". Accounting only: no allocation changes. A test reads the region tag of a small and a large allocation back through mach_vm_region (100 without the fix, 254 with it). Refs #1369 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
History
|
|
|---|---|---|
| .. | ||
| android | ||
| card-web | ||
| ios | ||
| landing | ||
| www-redirect | ||
| zeron | ||
| zgx | ||