Version: 4.2.1
1.2 Memory Pools
C pointer type that records the pool in which it is allocated as
a tag.
Checks whether the given obj is a pooled C pointer.
Retrieves the pool in which obj was allocated. Returns
a memory pool object or #f if obj is not a pooled
C pointer.
C pointer type of a memory pool.
Checks whether the given obj is a memory pool.
(current-pool) → (or/c pool? #f) |
(current-pool pool) → void? |
pool : (or/c pool? #f) |
Holds the memory pool to use for any native calls in the current
dynamic scope that require one.
Creates a new memory pool that is a child of parent. When
the parent pool is destroyed so are all its children.
The pool is automatically destroyed by a finalizer when no more references from Scheme code to the pool itself, to its subpools or to any objects allocated in the pool or its subpools exist.
Checks whether a is a parent memory pool of b.
Evaluates to an anonymous procedure that takes arguments as
specified by lambda-list and executes
(proc-expr arg-exprs ) with a parameterization that
includes a newly created child pool of the (current-pool).
The proc-expr is evaluated only once, not for each invocation of the resulting procedure.
This macro is mainly intended for the quick implementation of wrappers around C library calls.
Works like wrapper-with-pool but only creates a new memory
pool if (current-pool) returns #f.
Allocates size bytes from the (current-pool) and
returns an untyped pooled pointer to the uninitialized data block.
This procedure is unsafe.
Allocates a copy of bytes in the (current-pool)
and returns an untyped pooled pointer to the data.
This procedure is unsafe.