[Kstars-devel] more on memory usage (correction)

Jason Harris kstars at 30doradus.org
Mon Oct 6 15:30:11 CEST 2003


Hello,

I've done a more detailed comparison of loading different numbers of stars 
both with and without star names.  Again, the unnamed stars are selected by 
starting with the file hip021.dat instead of hip001.dat.  In each trial, I 
load a different number of hipNNN.dat files to achieve a different number of 
stars loaded.  I then measure the memory footprint of the program using the 
"SIZE" column of the top command.  In each case, I then subtract off the 
memory footprint of the program when zero stars are loaded to get the 
effective memory footprint used by that number of stars.

I had stated in my last message that the effective memory usage per star 
decreased with increasing number of stars in both the named and unnamed 
cases, and concluded from this that the extra memory usage might not be 
associated with individual StarObjects.  However, this was based on only two 
trials with unnamed stars.  I have repeated the analysis for many trials, and 
the results now show that the memory-per-star is roughly constant at ~615 
bytes for unnamed stars.  So this means that the apparent decrease in memory 
used per star is probably just because of the name data (which is present 
among the brightest few thousand stars) after all.  Here are the results:

                [ Named Stars ]	[ Unnamed Stars ]
Nstars:	SIZE:	per-star:	SIZE:	per-star:  
0		34236	--		34252      --        
1000	34976	740		34808	552        
2000	35608	686		35472	610        
3000	36240	668		36096	614        
4000	36860	656		36712	615        
5000	37496	652		37272	604        
10000	40588	635		40428	617        
20000	46772	627		46616	618        
49074	64740	620		64592	618        
125982	109000	594		--		--

I should also note that my previous results were done on my desktop running 
KDE CVS, whereas these results were done on my laptop, using KDE 3.1.0.

Anyway, nothing too enlightening here, I'm afraid.  Just confirming that we 
are using about 600 bytes per StarObject, when only 364 bytes can be 
accounted for.  The new point is that it can't be due to star names, since 
the second set of trials contained only unnamed stars.

regards,
Jason

-- 
KStars:  A K Desktop Planetarium
http://edu.kde.org/kstars


More information about the Kstars-devel mailing list