Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e4cbe0ec authored by Colin Cross's avatar Colin Cross
Browse files

Fix allocator::map template argument ordering

allocator::map reversed Key and T from std::map

Bug: 27208635
Change-Id: I4e4db704539d01b060cb948aa573cb674da48c7d
(cherry picked from commit 4c5bccdd)
parent d6b3a2a0
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -209,7 +209,7 @@ using vector = std::vector<T, Allocator<T>>;
template<class T>
using list = std::list<T, Allocator<T>>;

template<class T, class Key, class Compare = std::less<Key>>
template<class Key, class T, class Compare = std::less<Key>>
using map = std::map<Key, T, Compare, Allocator<std::pair<const Key, T>>>;

template<class Key, class Hash = std::hash<Key>, class KeyEqual = std::equal_to<Key>>
+1 −1
Original line number Diff line number Diff line
@@ -74,7 +74,7 @@ class HeapWalker {

  DISALLOW_COPY_AND_ASSIGN(HeapWalker);
  Allocator<HeapWalker> allocator_;
  using AllocationMap = allocator::map<AllocationInfo, Range, compare_range>;
  using AllocationMap = allocator::map<Range, AllocationInfo, compare_range>;
  AllocationMap allocations_;
  size_t allocation_bytes_;
  Range valid_allocations_range_;
+1 −1
Original line number Diff line number Diff line
@@ -81,7 +81,7 @@ class LeakFolding {
  void ComputeDAG();
  void AccumulateLeaks(SCCInfo* dominator);

  allocator::map<LeakInfo, Range, compare_range> leak_map_;
  allocator::map<Range, LeakInfo, compare_range> leak_map_;
  Graph<LeakInfo> leak_graph_;
  allocator::vector<Allocator<SCCInfo>::unique_ptr> leak_scc_;
};
+1 −1
Original line number Diff line number Diff line
@@ -86,7 +86,7 @@ class ThreadCaptureImpl {
  void PtraceDetach(pid_t tid, unsigned int signal);
  bool PtraceThreadInfo(pid_t tid, ThreadInfo& thread_info);

  allocator::map<unsigned int, pid_t> captured_threads_;
  allocator::map<pid_t, unsigned int> captured_threads_;
  Allocator<ThreadCaptureImpl> allocator_;
  pid_t pid_;
  std::function<void(pid_t)> inject_test_func_;