comparison DblHist.c @ 15:32489b8b763c

added MC_shared brch
author Me@portablequad
date Sat, 11 Feb 2012 19:20:37 -0800
parents 1fbaedaac2c7
children f4d96eaf374a
comparison
equal deleted inserted replaced
4:1144f8131cf3 5:2399bbf3bb6d
26 makeDblHistogram( int32 numBins, float64 startOfRange, float64 binWidth ) 26 makeDblHistogram( int32 numBins, float64 startOfRange, float64 binWidth )
27 { 27 {
28 DblHist *hist; 28 DblHist *hist;
29 int i; 29 int i;
30 30
31 hist = malloc( sizeof(DblHist) ); 31 hist = VMS__malloc( sizeof(DblHist) );
32 hist->bins = malloc( numBins * sizeof(int) ); 32 hist->bins = VMS__malloc( numBins * sizeof(int) );
33 33
34 hist->numBins = numBins; 34 hist->numBins = numBins;
35 hist->binWidth = binWidth; 35 hist->binWidth = binWidth;
36 hist->endOfRange = startOfRange + hist->binWidth * numBins; 36 hist->endOfRange = startOfRange + hist->binWidth * numBins;
37 hist->startOfRange = startOfRange; 37 hist->startOfRange = startOfRange;
100 100
101 101
102 void 102 void
103 freeDblHist( DblHist *hist ) 103 freeDblHist( DblHist *hist )
104 { 104 {
105 free( hist->bins ); 105 VMS__free( hist->bins );
106 free( hist ); 106 VMS__free( hist );
107 } 107 }