| Aspect | mspan | mheap |
|---|---|---|
| Scope | Local to P while allocated | Global, shared among all Ps |
| Allocation | Divided into slots for small objects | Provides spans to mcentral/mcache or allocates large objects directly |
| Sharing | Moves between Ps via mcentral, never shared while in use | Shared globally across all Ps |
| Locking | Lock-free while local | Locking required for global access |
Created
September 24, 2025 04:29
-
-
Save Anshuman-02905/7cbc81f41c386700ec35fdebce7bce79 to your computer and use it in GitHub Desktop.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment