cleaned up MemoryManager code
AcceptedPublic

Authored by fabiank on Jun 30 2018, 4:49 PM.

Details

Reviewers
aacid
Group Reviewers
KDE Games
Summary
  • Previously, it relied on allocating space behind an actual TREE and

then later accessing it via pointer arirthmetic. Now we have an actual
array as a member of the TREE. TREE is now also a template, templated
over the size of the array (which coincides with the pilecount of each
Solver)

  • Alignment is now handled in the allocator, instead of ensuring that

every MemoryManager allocation preserves the alignment

  • more typesafety in the allocation functions
Test Plan
  • run Kpat manually, solver could still manage to solve games and determine solvability (at least to the extent it did before)
  • memory usage stayed roughly the same
  • Asan did not complain

Diff Detail

Repository
R410 KPatience
Branch
cleanup_mm
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 500
Build 500: arc lint + arc unit
fabiank created this revision.Jun 30 2018, 4:49 PM
Restricted Application added a reviewer: KDE Games. · View Herald TranscriptJun 30 2018, 4:49 PM
Restricted Application added a subscriber: kde-games-devel. · View Herald Transcript
fabiank requested review of this revision.Jun 30 2018, 4:49 PM
aacid accepted this revision.Jul 28 2018, 8:46 PM
aacid added a subscriber: aacid.

I'm not going to pretend that i had time to read and understand the code, but if you think it's better and you'll fix any bugs that it may introduce, just go ahead and commit it :)

CMakeLists.txt
3

You need to increase cmake to 3.1 if you want the CMAKE_CXX_STANDARD

patsolve/memory.h
26

What do you need from QtGlobal?

This revision is now accepted and ready to land.Jul 28 2018, 8:46 PM

Yikes, your reply went victim of an overzealous spam filter rule, sorry for the late reply. Considering that there are a few outstanding bugs like bko 397817, I think I will delay merging this for a little longer. I think I probably should first attempt to write some integration/unit tests, to ensure that it really works.