Louis Feng | Out of Core

brain dump of things

  • Home
  • Blog
    • Tools
    • Algorithms
    • Design
    • Code
  • Projects
    • Shell Maps
    • Anisotropic Noise Samples
  • About
You are here: Home / Archives for C++

Scripted Debug Using GDB To Find Memory Leak

June 29, 2011 by Louis Feng 4 Comments

I recently ran into some hard to find memory leaks. The program only runs on Linux. The memory leaks are detected using a custom memory allocator (using an atomic counter for allocation/deallocation size). In single thread mode, the program terminated without leaking, but running in multithread mode resulted in 1.7 to 4 KB of leaked […]

Filed Under: Blog, Code, Tools Tagged With: C++, diff, GDB, memory leak

C++ Container Iterator Invalidation

April 5, 2011 by Louis Feng 7 Comments

In a recent coding review a coworker pointed out in my code that modifying a STL list might invalidate the iterators pointing to the elements in the list. That’s a good observation. I know STL map will not invalidate iterators when elements are inserted or erased from the container. But for STL list, I can’t […]

Filed Under: Blog, Code Tagged With: C++, container, iterator, list, map, stl, vector

C++ Serialization

December 8, 2010 by Louis Feng Leave a Comment

I’m working on a project where I need to dump out object data for both debugging purpose as well as a way to store them persistently. My initial implementation which overloads C++ iostream for each of the objects proven to be inadequate when the amount of data I’m writing out become larger and more complex. […]

Filed Under: Blog, Code Tagged With: C++

Archives

  • February 2012
  • July 2011
  • June 2011
  • April 2011
  • March 2011
  • December 2010

Tags

adobe flash apple book C++ clang cocoa container diff GDB html iOS ipad ipad 2 iphone iterator list llvm map memory leak nib review software engineering stl UITableViewController UIViewController vector vectorization view controller windows

Return to top of page

Copyright © 2015 Louis Feng | Out of Core