Hi Patrick,
Patrick Hartling wrote:
> Has anyone ever tried to customize memory allocation of field containers? My
> hope is to address potential memory fragmentation issues resulting from
> frequent allocation and deallocation of field container objects--assuming
> that we do find that to be a problem. Specifically, I am thinking about how
> to change the allocation of custom field containers that are written as
> extensions to OpenSG. I was skimming the code and started thinking about the
> possibility of specializing OSG::FieldContainer::newPtr<T>() for a given
> custom field container type, but maybe it would just be easier (and less
> arcane) to overload new and delete for the types in question.
>
This is one of those things where I always have to restrain myself and
meditate to the Knuth mantra: "Premature optimization is the root of all
evil". Before going through the pain of doing something like that I
would wait until it is a real problem and then try to use a different
memory manager like for example Hoard (http://www.hoard.org/) and see if
that fixes it.
Just my $.02
Dirk
------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users