gpgscm: Recover cells from the list of recently allocated cells.

* tests/gpgscm/scheme.c (ok_to_freely_gc): Recover cells.

Signed-off-by: Justus Winter <justus@g10code.com>
This commit is contained in:
Justus Winter 2016-11-10 14:47:00 +01:00
parent e0cbd3389e
commit ee08677d63
1 changed files with 11 additions and 6 deletions

View File

@ -805,6 +805,17 @@ static void push_recent_alloc(scheme *sc, pointer recent, pointer extra)
car(sc->sink) = holder;
}
static INLINE void ok_to_freely_gc(scheme *sc)
{
pointer a = car(sc->sink), next;
car(sc->sink) = sc->NIL;
while (a != sc->NIL)
{
next = cdr(a);
free_cell(sc, a);
a = next;
}
}
static pointer get_cell(scheme *sc, pointer a, pointer b)
{
@ -832,12 +843,6 @@ static pointer get_vector_object(scheme *sc, int len, pointer init)
return cells;
}
static INLINE void ok_to_freely_gc(scheme *sc)
{
car(sc->sink) = sc->NIL;
}
#if defined TSGRIND
static void check_cell_alloced(pointer p, int expect_alloced)
{