How do you deal with scoped allocations?

Denis Shelomovskij verylonglogin.reg at gmail.com
Thu Dec 12 01:18:49 PST 2013


08.12.2013 2:32, Namespace пишет:
> Since my last thread doesn't get much attention I like to ask here: How
> did you deal with temporary memory?

The algorithm is always this:

1. Use function stack frame for small allocations.
2. Use thread local stack allocator if temporary allocations corresponds 
LIFO principle and use thread local heap otherwise.

As for usability it must be a single function call and D type system 
have to rest.

> And what do you use?

As I answered in previous thread:
http://forum.dlang.org/thread/nxrxojbzbrfkkkkwvkqj@forum.dlang.org#post-l77th1:24icc:241:40digitalmars.com

-- 
Денис В. Шеломовский
Denis V. Shelomovskij


More information about the Digitalmars-d mailing list