Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
Trac
Trac
  • Project overview
    • Project overview
    • Details
    • Activity
  • Issues 246
    • Issues 246
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Operations
    • Operations
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Create a new issue
  • Issue Boards

GitLab is used only for code review, issue tracking and project management. Canonical locations for source code are still https://gitweb.torproject.org/ https://git.torproject.org/ and git-rw.torproject.org.

  • Legacy
  • TracTrac
  • Issues
  • #10116

Closed (moved)
Open
Opened Nov 07, 2013 by Nick Mathewson@nickm🥄

Avoid memory allocation in OOM handler

Right now, the OOM handler allocates an array of size(n_circs * sizeof(void*)) to figure out which circuits to kill. That's probably not a good idea. Instead, it would be better to select the select circuits from the circuitlist.

Options here include:

  • Turn global_circuitlist into an array (smartlist) structure.
  • Retain the linked-list structure, but do one of these:
    • Use a merge sort to sort the circuitlist in place.
    • Do an O(N^2) algorithm to walk the circuitlist to find the worst circuit, delete that, and then do it over and over until we have killed enough circuits.
    • Do an O(Nk) algorithm to walk the circuitlist to find the k worst circuits; kill them; repeat until we have killed enough circuits. This still turns out to O(N^2)
To upload designs, you'll need to enable LFS and have admin enable hashed storage. More information
Assignee
Assign to
Tor: 0.2.6.x-final
Milestone
Tor: 0.2.6.x-final
Assign milestone
Time tracking
None
Due date
None
Reference: legacy/trac#10116