diff --git a/runtime/src/main/cpp/Memory.cpp b/runtime/src/main/cpp/Memory.cpp index a51ad342add..f19ef114efd 100644 --- a/runtime/src/main/cpp/Memory.cpp +++ b/runtime/src/main/cpp/Memory.cpp @@ -451,7 +451,9 @@ struct MemoryState { uint64_t allocSinceLastGcThreshold; #endif // USE_GC - KStdUnorderedMap initializingSingletons; + // This map is expected to be small, std::map consumes less memory than + // std::unordered_map and is just as efficient. + KStdOrderedMap initializingSingletons; #if COLLECT_STATISTIC #define CONTAINER_ALLOC_STAT(state, size, container) state->statistic.incAlloc(size, container);