Daniel Williams (dwilliams++at++sarnoff.com)
Fri, 07 Aug 1998 17:08:42 -0400
I'm trying to understand the memory allocation behavior of my
application and have discovered that a pool of arena memory is being
accumulated at the following location:
pfMemory::operator new(unsigned int,unsigned int,void*)
[pfMemory.C:105]
pfMemory::malloc(unsigned int) [pfMemory.C:480]
_pfCuller::pf_getFuncs(void) [pfCuller.C:637]
_pfCuller::pf_flushStackState(void) [pfCuller.C:426]
_pfCuller::add(pfGeoSet*) [pfCuller.C:369]
pfGeode::nb_cull(int,int,_pfCuller*) [pfGeode.C:269]
pfGroup::nb_cull(int,int,_pfCuller*) [pfGroup.C:306]
pfScene::nb_cull(int,int,_pfCuller*) [pfScene.C:293]
_pfCuller::nb_cull(void) [pfCuller.C:208]
beginDraw(int) [pfProcess.C:6293]
pfDraw [pfProcess.C:6347]
pfDWChannel::drawCallback(pfChannel*,void*)
[pfDWChannel.c++:225]
pfChannel::pf_callDrawFunc(void) [pfChannel.C:2194]
doDraw(pfChannel*,pfPipe*,int*) [pfProcess.C:6200]
appCullDraw(int) [pfProcess.C:3944]
pfFrame [pfProcess.C:4400]
The memory seems to be associated with pfChannel because usage doubles
if I run in stereo.
This memory is not freed when I delete the entities; instead, it seems
to be reused for subsequent entities. It is allocated in binary
exponential form:
11296 bytes allocated in 2 blocks
22592 bytes allocated in 4 blocks
45184 bytes allocated in 8 blocks
90368 bytes allocated in 16 blocks
180736 bytes allocated in 32 blocks
361472 bytes allocated in 64 blocks
This is worrying because if my calculations are correct, the memory
used is (5648 bytes) * number-of-entities * number-of-channels; if I
have 5000 entities on a 3-pipe stereo machine my usage is 161 MB for
something I know nothing about.
Can someone peer into the pfSourceCode and tell me what _pfCuller is
doing in this case and how I might avoid it?
Thanks,
Dan
--
Daniel Williams, Systems & Scientific Software
Voice: (215) 885-1573 Email: sass++at++acm.com
Independent Consultant to: Sarnoff Corporation
Voice: (609) 734-2153 Email: dwilliams++at++sarnoff.com
=======================================================================
List Archives, FAQ, FTP: http://www.sgi.com/Technology/Performer/
Submissions: info-performer++at++sgi.com
Admin. requests: info-performer-request++at++sgi.com
This archive was generated by hypermail 2.0b2 on Tue Aug 11 1998 - 13:42:35 PDT