Why does OSThread exist?
Thomas Stüfe
thomas.stuefe at gmail.com
Tue Dec 7 06:30:32 UTC 2021
Hi,
does anybody know what the point is of a separate OSThread companion class
to Thread? I understand that there is OS-specific information one wants to
factor out on a per-platform base, but why two physically separate
structures? AFAICS they never exist separately (an OSThread makes no sense
without a Thread, and vice versa). We pay unnecessarily for two
allocations, C-heap fragmentation, and for one additional dereferencing hop
when accessing OSThread.
Thanks, Thomas
More information about the hotspot-runtime-dev
mailing list