@@ -848,9 +848,17 @@ VOID WriteSetup(VOID)
848848 To be used for the main allocation of the sort buffers, and
849849 in a later stage for the function and subroutine sort buffers.
850850*/
851- SORTING * AllocSort (LONG LargeSize , LONG SmallSize , LONG SmallEsize , LONG TermsInSmall ,
852- int MaxPatches , int MaxFpatches , LONG IOsize )
851+ SORTING * AllocSort (LONG inLargeSize , LONG inSmallSize , LONG inSmallEsize , LONG inTermsInSmall ,
852+ int inMaxPatches , int inMaxFpatches , LONG inIOsize )
853853{
854+ LONG LargeSize = inLargeSize ;
855+ LONG SmallSize = inSmallSize ;
856+ LONG SmallEsize = inSmallEsize ;
857+ LONG TermsInSmall = inTermsInSmall ;
858+ int MaxPatches = inMaxPatches ;
859+ int MaxFpatches = inMaxFpatches ;
860+ LONG IOsize = inIOsize ;
861+
854862#ifndef SPLITALLOC
855863 LONG allocation ;
856864#endif
@@ -878,7 +886,6 @@ SORTING *AllocSort(LONG LargeSize, LONG SmallSize, LONG SmallEsize, LONG TermsIn
878886 terms2insmall = 2 * TermsInSmall ; /* Used to be just + 100 rather than *2 */
879887 if ( SmallEsize < (SmallSize * 3 )/2 ) SmallEsize = (SmallSize * 3 )/2 ;
880888 if ( LargeSize > 0 && LargeSize < 2 * SmallSize ) LargeSize = 2 * SmallSize ;
881- /* if ( SmallEsize < 3*AM.MaxTer ) SmallEsize = 3*AM.MaxTer; */
882889 SmallEsize = (SmallEsize + 15 ) & (-16L );
883890 if ( LargeSize < 0 ) LargeSize = 0 ;
884891 sortsize = sizeof (SORTING );
@@ -902,6 +909,15 @@ SORTING *AllocSort(LONG LargeSize, LONG SmallSize, LONG SmallEsize, LONG TermsIn
902909 if ( (LONG )(IObuffersize * sizeof (WORD )) < IOtry )
903910 IObuffersize = (IOtry + sizeof (WORD )- 1 )/sizeof (WORD );
904911
912+ // Warn if any of the specified sizes have been adjusted:
913+ if ( LargeSize != inLargeSize ) { MesPrint ("Warning: LargeSize adjusted: %l -> %l" , inLargeSize , LargeSize ); }
914+ if ( SmallSize != inSmallSize ) { MesPrint ("Warning: SmallSize adjusted: %l -> %l" , inSmallSize , SmallSize ); }
915+ if ( SmallEsize != inSmallEsize ) {MesPrint ("Warning: SmallEsize adjusted: %l -> %l" , inSmallEsize , SmallEsize ); }
916+ if ( TermsInSmall != inTermsInSmall ) { MesPrint ("Warning: TermsInSmall adjusted: %l -> %l" , inTermsInSmall , TermsInSmall ); }
917+ if ( MaxPatches != inMaxPatches ) { MesPrint ("Warning: MaxPatches adjusted: %d -> %d" , inMaxPatches , MaxPatches ); }
918+ if ( MaxFpatches != inMaxFpatches ) {MesPrint ("Warning: MaxFPatches adjusted: %d -> %d" , inMaxFpatches , MaxFpatches ); }
919+ if ( IObuffersize != inIOsize /sizeof (WORD ) ) { MesPrint ("Warning: IOsize adjusted: %l -> %l" , inIOsize /sizeof (WORD ), IObuffersize ); }
920+
905921#ifndef SPLITALLOC
906922 allocation =
907923 3 * sizeof (POSITION )* (LONG )longer /* Filepositions!! */
0 commit comments