)]}' { "commit": "0af9df68d422cba7d0f29a5f2082578676cffae6", "tree": "22820a8a705546aad2f12cceb6be08326cacfe47", "parents": [ "e7571cfeb0a52cfb0f65ecf3285f84812dea08e3" ], "author": { "name": "Christopher Anderson", "email": "cja@google.com", "time": "Tue Jun 12 15:35:44 2018 -0700" }, "committer": { "name": "Christopher Anderson", "email": "cja@google.com", "time": "Tue Jun 12 15:44:50 2018 -0700" }, "message": "[ulib][ralloc] Add a cookie value to RegionAllocator::Region\n\nA uint64_t cookie value has been added to the Region class. By doing it\nin the Region class itself rather than the base ralloc_region_t it\nallows for continued use of C style struct initializers with GetRegion.\nDue to the const nature of returned regions from GetRegion, this cookie\nis set immutably as an optional argument to GetRegion. These changes\nhave the side effect of removing partiy between the C and C++ apis, but\nonly for the cookie. It is considered an acceptable cost to avoid all\ncallers using C style struct initialization needing to specify a default\ncookie value.\n\nThe impact this change will have is an extra 8 bytes of memory per\nregion pulled out of an allocator. On a Pixelbook there are presently\n~30 regions allocated at boot. This is miniscule compared to the benefit\nthe bookkeeping adds for clients of the library.\n\nTest: region-alloc-test\n\nChange-Id: I3f3eb65e990f94af58f71c6cc72fe36694632a13\n", "tree_diff": [ { "type": "modify", "old_id": "a97456cd631d167523790fc46a1f1fbf564c9b5b", "old_mode": 33188, "old_path": "system/ulib/region-alloc/include/region-alloc/region-alloc.h", "new_id": "3728d402a47bfcab5283cf89ce482586bee628e4", "new_mode": 33188, "new_path": "system/ulib/region-alloc/include/region-alloc/region-alloc.h" }, { "type": "modify", "old_id": "5f2cc87266b2822981bb47d1845fda61bfb9942c", "old_mode": 33188, "old_path": "system/ulib/region-alloc/region-alloc.cpp", "new_id": "85711cc99a5167c0be1e848aa42698e7b692815d", "new_mode": 33188, "new_path": "system/ulib/region-alloc/region-alloc.cpp" }, { "type": "modify", "old_id": "3c6e417cfda83c6b1e2e44b10f21e3e0a33ee6c8", "old_mode": 33188, "old_path": "system/utest/region-alloc/region-alloc.cpp", "new_id": "9bacfeca84918c82d75d6a76a31395c07073aeb4", "new_mode": 33188, "new_path": "system/utest/region-alloc/region-alloc.cpp" } ] }