{"push_id":2685612745,"size":1,"distinct_size":1,"ref":"refs/heads/master","head":"c2baf04cd2c2211334949ba12df2e49fd9109728","before":"9f98cc53e8530787e363c038be3993f3231e2708","commits":[{"sha":"c2baf04cd2c2211334949ba12df2e49fd9109728","author":{"name":"mikedn","email":"7bc4ab6e0f810a8cad730701d78271a3b2402d5b@hotmail.com"},"message":"Pass CompAllocator by value (#15025)\n\nPassing CompAllocator objects by value is advantageous because it no longer needs to be dynamically allocated and cached. CompAllocator instances can now be freely created, copied and stored, which makes adding new CompMemKind values easier.\r\n\r\nTogether with other cleanup this also improves memory allocation performance by removing some extra levels of indirection that were previously required - jitstd::allocator had a pointer to CompAllocator, CompAllocator had a pointer to Compiler and Compiler finally had a pointer to ArenaAllocator. Without MEASURE_MEM_ALLOC enabled, both jitstd::allocator and CompAllocator now just contain a pointer to ArenaAllocator. When MEASURE_MEM_ALLOC is enabled CompAllocator also contains a pointer but to a MemStatsAllocator object that holds the relevant memory kind. This way CompAllocator is always pointer sized so that enabling MEASURE_MEM_ALLOC does not result in increased memory usage due to objects that store a CompAllocator instance.\r\n\r\nIn order to implement this, 2 additional signficant changes have been made:\r\n* MemStats has been moved to ArenaAllocator, it's after all the allocator's job to maintain statistics. This also fixes some issues related to memory statistics, such as not tracking the memory allocated by the inlinee compiler (since that one used its own MemStats instance).\r\n* Extract the arena page pooling logic out of the allocator. It doesn't make sense to pool an allocator, it has very little state that can actually be reused and everyting else (including MemStats) needs to be reset on reuse. What really needs to be pooled is just a page of memory.\r\n\r\nSince this was touching allocation code the opportunity has been used to perform additional cleanup:\r\n* Remove unnecessary LSRA ListElementAllocator\r\n* Remove compGetMem and compGetMemArray\r\n* Make CompAllocator and HostAllocator more like the std allocator\r\n* Update HashTable to use CompAllocator\r\n* Update ArrayStack to use CompAllocator\r\n* Move CompAllocator & friends to alloc.h","distinct":true,"url":"https://api.github.com/repos/dotnet/coreclr/commits/c2baf04cd2c2211334949ba12df2e49fd9109728"}]}
{"actor":{"display_login":"AndyAyersMS"}}