onsdag 14 december 2011

w1d3: Testing framework, mentor meeting, WWAN network

I got acquianted with Google Test. On Ubuntu Oneiric it doesn't show up in the apt listing and needs libpthread for linking. The first test verifies that balloc() returns non-NULL for a memory chunk smaller than the maximum amount of memory available, set by binit(size_t).  I implemented a trivial alloc/free for the test to pass.

There will be both black box testing, on the client side, and white box testing, on the allocator side. Client side is easily tested by feeding it random numbers and randomly freeing memory. For this, a graphical representation of the heap would be useful to spot used blocks and holes.
Internally, I expect verifying data structure invariants to be the most useful tests.

I had my weekly 30-min meeting with my mentor at Opera. The following topics were discussed:

  • how a buddy allocator works (me presenting)
  • compacting is the knapsack problem and hard to do right.
  • using a priority list of blocks for speeding up incremental compacting
  • overriding operator*() for automatic locking
  • modifying memory access, which in itself is another thesis topic

Finally, I picked up a WWAN subscription so I can work from any location.

Inga kommentarer:

Skicka en kommentar