Skip to content

Commit

Permalink
Switch to std::map
Browse files Browse the repository at this point in the history
  • Loading branch information
projedi committed Mar 24, 2020
1 parent 39d678b commit 783e052
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion runtime/src/main/cpp/Memory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,9 @@ struct MemoryState {
uint64_t allocSinceLastGcThreshold;
#endif // USE_GC

KStdUnorderedMap<ObjHeader**, ObjHeader*> initializingSingletons;
// This map is expected to be small, std::map consumes less memory than
// std::unordered_map and is just as efficient.
KStdOrderedMap<ObjHeader**, ObjHeader*> initializingSingletons;

#if COLLECT_STATISTIC
#define CONTAINER_ALLOC_STAT(state, size, container) state->statistic.incAlloc(size, container);
Expand Down

0 comments on commit 783e052

Please sign in to comment.