[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

alloca and GC

From: Keisuke Nishida
Subject: alloca and GC
Date: Fri, 26 Jan 2001 14:59:14 -0500
User-agent: Wanderlust/2.4.0 (Rio) SEMI/1.13.7 (Awazu) FLIM/1.13.2 (Kasanui) Emacs/21.0.95 (i686-pc-linux-gnu) MULE/5.0 (SAKAKI)


I am wondering if SCM objects stored in alloca'ed memories,
as shown below, are garbage-collected or not.  A preliminary
test showed they aren't:

  scm_bits_t *sp = alloca (100 * sizeof (scm_bits_t));
  sp[0] = SCM_UNPACK (scm_cons (SCM_BOOL_F, SCM_BOOL_F));
  /* sp[0] won't be collected until the end of this function */

Is this true?  Is it safe to store other data than SCM objects
in the allocated memory?  If so, it's convenient for VM stacks.
(BTW, how this works?)

Keisuke Nishida

reply via email to

[Prev in Thread] Current Thread [Next in Thread]