alsalisp memory allocation optimization

- force of reusing alisp objects
  - added auto-garbage-collect mechanism
  - fixed bad garbage-collect (yes, the original code can free "running" lisp program)
  - hctl.lisp test example
    - reduced lisp object memory pool usage from 240kB to 29kB (auto-gc)
    - reduced --''-- from 29kB (auto-gc) to 9kB (manual gc)
FIXME: we need definitely an opminization for the alisp object lookups
       - use bsearch()?
This commit is contained in:
Jaroslav Kysela 2003-08-22 09:41:17 +00:00
parent 06221f86d2
commit 523b1eb92e
3 changed files with 199 additions and 93 deletions

View file

@ -88,6 +88,7 @@ struct alisp_instance {
long free_objs;
long used_objs;
long max_objs;
long gc_thr_objs;
struct alisp_object *free_objs_list;
struct alisp_object *used_objs_list;
/* set object */