[PATCH] D69265: [scudo][standalone] Consolidate lists

Kostya Kortchinsky via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 21 08:44:20 PDT 2019


cryptoad created this revision.
cryptoad added reviewers: morehouse, hctim, eugenis, vitalybuka, cferris.
Herald added subscribers: Sanitizers, jfb, delcypher.
Herald added projects: LLVM, Sanitizers.

I was going to introduce a couple more lists and realized that our
lists are currently a bit all over the place. While we have a singly
linked list type relatively well defined, we are using doubly linked
lists defined on the fly for the stats and for the secondary blocks.

This CL adds a doubly linked list object, reorganizing the singly list
one to extract as much of the common code as possible. We use this
new type in the stats and the secondary. We also reorganize the list
tests to benefit from this consolidation.

There are a few side effect changes such as using for iterator loops
that are, in my opinion, cleaner in a couple of places.


Repository:
  rCRT Compiler Runtime

https://reviews.llvm.org/D69265

Files:
  lib/scudo/standalone/list.h
  lib/scudo/standalone/primary32.h
  lib/scudo/standalone/primary64.h
  lib/scudo/standalone/quarantine.h
  lib/scudo/standalone/release.h
  lib/scudo/standalone/secondary.cpp
  lib/scudo/standalone/secondary.h
  lib/scudo/standalone/stats.h
  lib/scudo/standalone/tests/list_test.cpp
  lib/scudo/standalone/tests/release_test.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D69265.225895.patch
Type: text/x-patch
Size: 19144 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191021/a0ffa734/attachment.bin>


More information about the llvm-commits mailing list