Recycle fluid numbers.
authorLudovic Courtès <ludo@gnu.org>
Fri, 5 Mar 2010 12:38:28 +0000 (13:38 +0100)
committerLudovic Courtès <ludo@gnu.org>
Fri, 5 Mar 2010 12:41:20 +0000 (13:41 +0100)
commitbd5a75dcd8436ebe077c9ce52300d013e9519d94
treeab0d4f71387069089fb3eec8c41da2b01f1ea483
parentc02924d02b4b78998b380deb20a4fd2d5fc3cfbb
Recycle fluid numbers.

* libguile/fluids.c: Remove outdated comment on the complexity of fluid GC.
  (FLUID_GROW): Increase to 128.
  (allocated_fluids): Change to `void **'.
  (allocated_fluids_num): Remove.
  (grow_dynamic_state): Remove race-condition checker.  Grow to
  ALLOCATED_FLUIDS_LEN.
  (next_fluid_num): Rename to...
  (new_fluid): ... this.  Return a fluid instead of a fluid number.
  Assume ALLOCATED_FLUIDS is sparse and search for a free number in it.
  Make ALLOCATED_FLUIDS point to pointerless memory and initialize
  individual elements with a pointer to the new fluid.  Register a
  disappearing link from there to the fluid.
  (scm_make_fluid): Use `new_fluid ()'.
  (scm_fluid_ref, scm_fluid_set_x, scm_i_swap_with_fluids): Remove
  assertion that wasn't checked in a thread-safe way.
libguile/fluids.c