mirror of
https://github.com/google/tcmalloc.git
synced 2026-10-28 16:44:45 +08:00
The lifetime-based allocator is intended for handling medium and large allocations. It predicts whether or not the object is short-lived. If so, it puts the object into a separate HugeRegion that is expected to free up quickly. Otherwise, the allocation is ignored, to be handled by the usual allocation path. The lifetime-based allocator supports a counterfactual mode where objects are not actually stored in a different region but where the allocator tracks the prediction accuracy and memory consumption that such an approach would have. PiperOrigin-RevId: 412992130 Change-Id: I62e742a9e7b741dfb214503b31a66a01a7e183e7