Memory allocation purity
Brian Schott via Digitalmars-d
digitalmars-d at puremagic.com
Wed May 14 15:42:46 PDT 2014
What is the plan for the "pure"-ity of memory management?
Right now the "new" operator is considered to be pure even though
it is not, but related functinos like malloc, GC.addRange,
GC.removeRange, and others are not.
This prevents large portions of std.allocator from being pure.
This then prevents any containers library built on std.allocator
from being pure, which does the same for any funcions and data
structures written using those containers.
If malloc can never be considered pure, even when hidden behind
an allocator, why can it be considered pure when hidden behind
the GC?
More information about the Digitalmars-d
mailing list