Archive for VxWorks

VxWorks 5.5.1 Memory Coalescing

In VxWorks 5.5.1, there is apparently a bug in the way blocks of freed memory are coalesced.  I’ve found that performance of new and delete calls can be extremely poor unless the delete calls are made in opposite order of the new calls, i.e.

  1. new A
  2. new B
  3. new C
  4. delete C
  5. delete B
  6. delete A

The performance hit from calling new and delete in order doesn’t become noticeable until dozens or hundreds of the calls are performed per second.  This problem may apply to other versions of VxWorks as well.