Is this project possible?

Lars Ivar Igesund larsivar at igesund.net
Wed Aug 6 00:33:26 PDT 2008


Benji Smith wrote:

> 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.

I should note that this is typically how the Mango servers operate (and the
stuff in tango.net.cluster) - they should never allocate after startup.
They also use the stack where possible, making the total memory usage
extremely low.

-- 
Lars Ivar Igesund
blog at http://larsivi.net
DSource, #d.tango & #D: larsivi
Dancing the Tango



More information about the Digitalmars-d mailing list