Is this project possible?
Benji Smith
dlanguage at benjismith.net
Tue Aug 5 22:51:46 PDT 2008
Robert Fraser wrote:
> Just to be clear, you don't need to avoid allocation -- just allocation using
> the D GC if you don't manually "delete" the memory later. Basically, just
> make sure all your memory management is manual, and try to avoid implicit
> allocations like AA use, array concatenation, etc. As long as you delete
> anything you new and free anything you malloc, you'll be fine.
I should have clarified... Of course, I'll allocate memory, but I'll do
it all up-front, allocating a pool of objects, and then I'll use object
factories to draw from that pool, recycling objects myself when I'm
finished with them rather than letting the GC reclaim the memory.
It's not a programming paradigm I'm used to, since I typically program
in garbage-collected environments, but I'll get used to it. Once I've
written the core data structures, it shouldn't be too different.
--benji
More information about the Digitalmars-d
mailing list