Static maps are inefficient and possibly not thread safe #1106
Labels
design discussion
Ways to improve OSHI's design
performance
Speeding up OSHI or reducing memory footprint
thread safety
Issues impacting thread safety
I realized after committing #1101 that the static memoized map I used in
MacNetworks
, while thread safe, would never be GC'd and thus should not have been static.FreeBSDDisks
has a non-thread-safemountMap
anddiskMap
.These should be made thread-safe and instance-based maps, and the codebase should be analyzed for any other static maps or other data caches.
The text was updated successfully, but these errors were encountered: