Skip to content
Snippets Groups Projects
  1. Apr 17, 2013
    • Nadav Har'El's avatar
    • Nadav Har'El's avatar
      Added rudimentary leak detection · 94d08688
      Nadav Har'El authored
      Added rudimentary support for leak detection. When memory::tracker_enabled
      is true, an alloc_tracker object (see alloctracker.{cc,hh}) object keeps
      track of still-living memory allocations and the call chain that led to each.
      Using a new command in gdb, "osv leak show", a developer can analyze the
      remaining allocations, with the aim of finding memory leaks (noticing that
      memory leaks often result in repeptitive allocations from the same call chain).
      
      This implementation is a good start (and already found 8 leaks in our code),
      but it's far from being perfect. It severely slows down the workload, the
      analysis in gdb is not yet friendly enough (requiring manual inspection to
      look for the more serious leaks), and the backtrace() implementation also
      appears to be fragile: In more than one occasion, we noticed a yet-unexplained
      crash when backtrace() unwinds the stack, calls dl_iterate_hphdr() which throws
      exception and unwinds the stack again. So this code will probably need more
      work in the future.
      94d08688
    • Nadav Har'El's avatar
      Add cooked (ICANON) console input. · 741c05b2
      Nadav Har'El authored
      Add support for ICANON mode a.k.a. "cooked" mode (see termios(3)), where the
      user's input only reaches the reader after a newline, and until then, the
      erase character case be used to edit the line. This makes it easier for
      non-perfect typist to use rhino ;-)
      
      Various line-discipline features such as word-erase, line kill, flow
      control and signals, aren't yet supported in this version.
      
      Note how the echo and the line discipline (editing) are now both handled in
      the console_poll() thread, while previously the echo was handled in the
      read() implementation (console_read()). This means we now have full read-ahead,
      i.e., the user can now type before read() starts - even during the OSv boot.
      
      This patch also removes the old debugging read() function, which doesn't do
      anything useful.
      741c05b2
    • Avi Kivity's avatar
      pthread: free stack after thread termination · 4d436c67
      Avi Kivity authored
      4d436c67
  2. Apr 15, 2013
  3. Apr 14, 2013
  4. Apr 11, 2013
  5. Apr 10, 2013
    • Nadav Har'El's avatar
      Better error messages when out of memory · c362a431
      Nadav Har'El authored
      When out of memory in alloc_page() or malloc_large(), we used to produce
      mysterious assertion failures or aborts. Now print a more user-friendly
      "out of memory" error (and abort).
      c362a431
Loading