/[gcl]/gcl/o/alloc.c
ViewVC logotype

Diff of /gcl/o/alloc.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.25 by vvzhy, Sat Nov 22 15:49:07 2003 UTC revision 1.26 by camm, Mon Dec 1 17:24:14 2003 UTC
# Line 218  call_after_gbc_hook(t) Line 218  call_after_gbc_hook(t)
218    
219  #define PERCENT_FREE(tm)  ((tm->tm_percent_free ? tm->tm_percent_free : 10)/100.0)  #define PERCENT_FREE(tm)  ((tm->tm_percent_free ? tm->tm_percent_free : 10)/100.0)
220    
221    static int
222    grow_linear(int old, int fract, int grow_min, int grow_max) {
223      
224      int delt;
225      if (fract==0)
226        fract=50;
227      if (grow_min==0)
228        grow_min=1;
229      if (grow_max==0)
230        grow_max=1000;
231    
232      delt=(old*fract)/100;
233      delt= (delt < grow_min ? grow_min:
234             delt > grow_max ? grow_max:
235             delt);
236    
237      return old + delt;
238    
239    }
240    
241    
242  object  object
243  alloc_object(enum type t)  alloc_object(enum type t)
# Line 291  Use ALLOCATE to expand the space.", Line 311  Use ALLOCATE to expand the space.",
311          goto ONCE_MORE;          goto ONCE_MORE;
312  }  }
313    
 static int  
 grow_linear(int old, int fract, int grow_min, int grow_max) {  
     
   int delt;  
   if (fract==0)  
     fract=50;  
   if (grow_min==0)  
     grow_min=1;  
   if (grow_max==0)  
     grow_max=1000;  
   
   delt=(old*fract)/100;  
   delt= (delt < grow_min ? grow_min:  
          delt > grow_max ? grow_max:  
          delt);  
   
   return old + delt;  
   
 }  
   
314  object  object
315  make_cons(object a, object d)  make_cons(object a, object d)
316  {  {

Legend:
Removed from v.1.25  
changed lines
  Added in v.1.26

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26