buffer: add dedicated allocator for tile data
Add gegl-tile-alloc -- a dedicated allocator for tile data. The allocator amortizes the cost of memory allocation, which is especially high on Windows, over multiple tiles, by allocating tiles in bulk, in groups called blocks (currently, each block is roughly 1% of the tile-cache size.) The allocator is currently limited to tiles whose size is a power of 2, possibly multiplied by 3 or 5 (to support tiles whose dimensions are powers of 2, with up to 5 components). The rest of the tiles are allocated using the normal allocator. Move the call to malloc_trim() from GeglBuffer's destructor to gegl-tile-alloc. We call it whenever tile data equivalent to ~10% of the tile-cache size is freed. Add a tile-alloc-total stat, which reports the total amount of memory currently used by the tile allocator.
Showing with 631 additions and 9 deletions