From: Larry E. Ramey (ramey++at++simcreator.com)
Date: 04/13/2005 13:48:08
Allan and Crew,
I have noticed an inconsistency on my "lesser" platforms. Because there
is no shared memory on linux/wintel pfGetSharedArena() returns null. OK,
that works for me.
pfMaterial* mat = new(arena) pfMaterial();
still works like I expect, it just uses heap memory instead of uber-sgi
shared memory.
However, when we go to the "struct" classes, all heck breaks lose.
pfVec3* verts = new(arena) pfVec3[ someNumberOfVerts ];
returns a NULL because we don't go to any special performer new, we just
try to use the placement new to take memory out of a NULL pointer.
I'd MUCH rather allocate all my memory using new instead of pfMalloc. I
am converting my new of pfVec3 and pfVec4 to pfMalloc because as much as
I hate pfMalloc, I hate #defineing my code to run on the Big Iron even
more. Would it be possible in 3.3 to change pfVec3 and the classes like
it so that when a new comes along they actaully do what a performer new
like pfMaterial does? (Inherit from pfMemory or whatever it is that
makes pfMaterial smarter than pfVec3)
If this isn't possible can you please update the man pages for
pfVec3/pfVec4/ect/ect so that I get a swift kick in the head when
reading it to remind me that a placement new out of a NULL arena is not
going to make my program happy.
Thanks,
Larry E. Ramey
-- This e-mail and any attachments may contain confidential and privileged information. If you are not the intended recipient, please notify the sender immediately by return e-mail, delete this e-mail and destroy any copies. Any dissemination or use of this information by a person other than the intended recipient is unauthorized and may be illegal. Unless otherwise stated, opinions expressed in this e-mail are those of the author and are not endorsed by the author's employer.
This archive was generated by hypermail 2b29 : Wed Apr 13 2005 - 13:50:28 PDT