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; |
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; |
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; |
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; |
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; |
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; |
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; |
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 |
|
|