/[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.18 by camm, Thu Feb 27 15:35:47 2003 UTC revision 1.19 by camm, Sat Mar 1 22:37:37 2003 UTC
# Line 742  DEFUN_NEW("STATICP",object,fSstaticp,SI, Line 742  DEFUN_NEW("STATICP",object,fSstaticp,SI,
742  /* } */  /* } */
743    
744  DEFUN_NEW("ALLOCATE",object,fSallocate,SI  DEFUN_NEW("ALLOCATE",object,fSallocate,SI
745         ,2,3,NONE,OO,IO,OO,OO,(object type,int npages,...),"")         ,2,3,NONE,OO,IO,OO,OO,(object type,fixnum npages,...),"")
746  {  {
747    
748    int nargs=VFUN_NARGS;    int nargs=VFUN_NARGS;
# Line 815  t_from_type(object type) { Line 815  t_from_type(object type) {
815     */     */
816    
817  DEFUN_NEW("ALLOCATE-SGC",object,fSallocate_sgc,SI  DEFUN_NEW("ALLOCATE-SGC",object,fSallocate_sgc,SI
818        ,4,4,NONE,OO,II,II,OO,(object type,int min,int max,int free_percent),"") {        ,4,4,NONE,OO,II,II,OO,(object type,fixnum min,fixnum max,fixnum free_percent),"") {
819    
820    int t=t_from_type(type);    int t=t_from_type(type);
821    struct typemanager *tm;    struct typemanager *tm;
# Line 840  DEFUN_NEW("ALLOCATE-SGC",object,fSalloca Line 840  DEFUN_NEW("ALLOCATE-SGC",object,fSalloca
840     It will try to grow PERCENT of the current pages.     It will try to grow PERCENT of the current pages.
841     */     */
842  DEFUN_NEW("ALLOCATE-GROWTH",object,fSallocate_growth,SI,5,5,NONE,OO,II,II,OO,  DEFUN_NEW("ALLOCATE-GROWTH",object,fSallocate_growth,SI,5,5,NONE,OO,II,II,OO,
843        (object type,int min,int max,int percent,int percent_free),"")        (object type,fixnum min,fixnum max,fixnum percent,fixnum percent_free),"")
844  {int  t=t_from_type(type);  {int  t=t_from_type(type);
845   struct typemanager *tm=tm_of(t);   struct typemanager *tm=tm_of(t);
846   object res,x,x1,x2,x3;   object res,x,x1,x2,x3;
# Line 865  DEFUN_NEW("ALLOCATE-GROWTH",object,fSall Line 865  DEFUN_NEW("ALLOCATE-GROWTH",object,fSall
865    
866    
867  DEFUN_NEW("ALLOCATE-CONTIGUOUS-PAGES",object,fSallocate_contiguous_pages,SI  DEFUN_NEW("ALLOCATE-CONTIGUOUS-PAGES",object,fSallocate_contiguous_pages,SI
868         ,1,2,NONE,OI,OO,OO,OO,(int npages,...),"")         ,1,2,NONE,OI,OO,OO,OO,(fixnum npages,...),"")
869  {  {
870    
871    int nargs=VFUN_NARGS,i,m;    int nargs=VFUN_NARGS,i,m;
# Line 884  DEFUN_NEW("ALLOCATE-CONTIGUOUS-PAGES",ob Line 884  DEFUN_NEW("ALLOCATE-CONTIGUOUS-PAGES",ob
884    if  (npages  < 0)    if  (npages  < 0)
885      FEerror("Allocate requires positive argument.", 0);      FEerror("Allocate requires positive argument.", 0);
886    if (ncbpage > npages) {    if (ncbpage > npages) {
887      printf("Allocate contiguous %d: %d already there pages",npages,ncbpage);      printf("Allocate contiguous %ld: %d already there pages",npages,ncbpage);
888      npages=ncbpage;      npages=ncbpage;
889    }    }
890    maxcbpage = npages;    maxcbpage = npages;
# Line 921  DEFUN_NEW("MAXIMUM-CONTIGUOUS-PAGES",obj Line 921  DEFUN_NEW("MAXIMUM-CONTIGUOUS-PAGES",obj
921    
922    
923  DEFUN_NEW("ALLOCATE-RELOCATABLE-PAGES",object,fSallocate_relocatable_pages,SI  DEFUN_NEW("ALLOCATE-RELOCATABLE-PAGES",object,fSallocate_relocatable_pages,SI
924         ,1,2,NONE,OI,OO,OO,OO,(int npages,...),"")         ,1,2,NONE,OI,OO,OO,OO,(fixnum npages,...),"")
925  {  {
926    
927    int nargs=VFUN_NARGS;    int nargs=VFUN_NARGS;
# Line 967  DEFUN_NEW("GET-HOLE-SIZE",object,fSget_h Line 967  DEFUN_NEW("GET-HOLE-SIZE",object,fSget_h
967  }  }
968    
969  DEFUN_NEW("SET-HOLE-SIZE",object,fSset_hole_size,SI  DEFUN_NEW("SET-HOLE-SIZE",object,fSset_hole_size,SI
970         ,1,2,NONE,OI,IO,OO,OO,(int npages,...),"")         ,1,2,NONE,OI,IO,OO,OO,(fixnum npages,...),"")
971  {  {
972    
973    int nargs=VFUN_NARGS;    int nargs=VFUN_NARGS;
# Line 977  DEFUN_NEW("SET-HOLE-SIZE",object,fSset_h Line 977  DEFUN_NEW("SET-HOLE-SIZE",object,fSset_h
977    reserve=30;    reserve=30;
978    if (nargs>=2) {    if (nargs>=2) {
979      va_start(ap,npages);      va_start(ap,npages);
980      reserve=va_arg(ap,int);      reserve=va_arg(ap,fixnum);
981      va_end(ap);      va_end(ap);
982    }    }
983        

Legend:
Removed from v.1.18  
changed lines
  Added in v.1.19

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