On 5/16/15 1:22 PM, Walter Bright wrote:
On 5/16/2015 9:34 AM, Andrei Alexandrescu wrote:
Once the memory in the front buffer is exhausted, the fallback
allocator starts
getting used. The correct way to handle the choice in the composer is
to first
try the front, and if it returns null, defer to the fallback.
Many other allocators follow similar patterns.
Ah, ok, that makes sense. I was thinking more in terms of the whole
program running out of memory, not fallback.
One more illustration of the same idea: just completed a larger doc.
http://erdani.com/d/phobos-prerelease/std_experimental_allocator_kernighan_ritchie.html
The Kernighan-Ritchie allocator is composed of a list of blocks, each
organized as a free list; when one block gets exhausted, the list
detects that and allocates more.
Andrei