WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Pointer cleanup for ease of use and better memory management #199

@spaulaus

Description

@spaulaus

Description

Pointers abound in the software. It's often difficult to figure out who has ownership and who should be deleting. The only notes about ownership are in the comments; they may or may not reflect reality. We know that pointers are not being handled properly since long running executions of the program tend to gobble memory on laptops. I suspect that kqxhc doesn't see the issue because it has 64GB of RAM.

I've been reading up on unique pointers. Since we've fully adopted the C++11 standard, we should start to implement these where we can. These could help clear up these issues.

Development Platform

  • Arch Linux
  • Kernel : 4.9.11-1-ARCH
  • Cmake : 3.6.3
  • Gcc : 6.3.1 20170109
  • gdb : 7.11.1

Work to be done

  1. Determine where the offending pointers are.
  2. Cleanup the code for better pointer management.
    1. Ensure that there's always a delete for every new.
    2. Ensure that we are not newing the same thing more than once, or that if we are we are deleting them.
  3. More to be determined later.

Acceptance Criteria

  1. The program is able to compile
  2. The program can scan large files without eating all the memory on systems with limited memory resources.
  3. The program is stable over long periods of time.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions