Transferring loads of array variables from Stack to Heap

This commit is contained in:
Hombre
2011-01-01 03:28:27 +01:00
parent 5ee87be11b
commit 9fa432880c
26 changed files with 190 additions and 72 deletions

View File

@@ -956,17 +956,21 @@ void CurveFactory::complexCurve (double ecomp, double black, double hlcompr, dou
}
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
int CurveFactory::gammatab [65536];
int CurveFactory::igammatab_srgb [65536];
int CurveFactory::gammatab_srgb [65536];
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
int *CurveFactory::gammatab = 0;
int *CurveFactory::igammatab_srgb = 0;
int *CurveFactory::gammatab_srgb = 0;
void CurveFactory::init () {
gammatab = new int[65536];
igammatab_srgb = new int[65536];
gammatab_srgb = new int[65536];
for (int i=0; i<65536; i++)
gammatab_srgb[i] = (int)(65535 * gamma2 (i/65535.0));
for (int i=0; i<65536; i++)
@@ -980,5 +984,11 @@ void CurveFactory::init () {
fclose (f);*/
}
void CurveFactory::cleanup () {
delete [] gammatab;
delete [] igammatab_srgb;
delete [] gammatab_srgb;
}
}