pike.git / src / builtin_functions.c

version» Context lines:

pike.git/src/builtin_functions.c:1:   /*   || This file is part of Pike. For copyright information see COPYRIGHT.   || Pike is distributed under GPL, LGPL and MPL. See the file COPYING   || for more information. - || $Id: builtin_functions.c,v 1.456 2003/01/05 00:55:44 nilsson Exp $ + || $Id: builtin_functions.c,v 1.457 2003/01/11 03:22:16 mast Exp $   */      #include "global.h" - RCSID("$Id: builtin_functions.c,v 1.456 2003/01/05 00:55:44 nilsson Exp $"); + RCSID("$Id: builtin_functions.c,v 1.457 2003/01/11 03:22:16 mast Exp $");   #include "interpret.h"   #include "svalue.h"   #include "pike_macros.h"   #include "object.h"   #include "program.h"   #include "array.h"   #include "pike_error.h"   #include "constants.h"   #include "mapping.h"   #include "stralloc.h"
pike.git/src/builtin_functions.c:3604:    GET_TIME_ELAPSED;   }      /*! @decl int gc()    *!    *! Force garbage collection.    *!    *! This function checks all the memory for cyclic structures such    *! as arrays containing themselves and frees them if appropriate.    *! It also frees up destructed objects and things with only weak -  *! references. It then returns how many -  *! arrays/objects/programs/etc. it managed to free by doing this. +  *! references.    *!    *! Normally there is no need to call this function since Pike will    *! call it by itself every now and then. (Pike will try to predict    *! when 20% of all arrays/object/programs in memory is 'garbage'    *! and call this routine then.) -  +  *! +  *! @returns +  *! The amount of garbage is returned. This is the number of arrays, +  *! mappings, multisets, objects and programs that had no nonweak +  *! external references during the garbage collection. It's normally +  *! the same as the number of freed things, but there might be some +  *! difference since destroy() functions are called during freeing, +  *! which can cause more things to be freed or allocated.    */   void f_gc(INT32 args)   {    pop_n_elems(args);    push_int(do_gc());   }      #ifdef TYPEP   #undef TYPEP   #endif