logd: use a std::list<> of values not pointers
This saves 4 or 8 bytes off of each log message for 32 bit or 64 bit devices respectively. In practice, this actually saves more, due to avoiding heap fragmentation. Averaging over 5 runs of the LogBufferTest.random_messages unit test (32 bit), this change results in 8k less memory used when 1000 logs are logged and results in 260k less memory used when 10000 logs are logged. Test: check memory usage during LogBufferTest.random_messages Test: logging unit tests Change-Id: Ia7953e3c4cb19631ef43bab1deb91bb336bc2520
Loading
Please register or sign in to comment