The garbage-pools Reference Manual

Table of Contents

Next: , Previous: , Up: (dir)   [Contents][Index]

The garbage-pools Reference Manual

This is the garbage-pools Reference Manual, version 0.1.2, generated automatically by Declt version 3.0 "Montgomery Scott" on Mon Apr 19 16:08:09 2021 GMT+0.


Next: , Previous: , Up: Top   [Contents][Index]

1 Introduction

#+TITLE: garbage-pools

GARBAGE-POOLS is Common Lisp re-implementation the APR Pools for resource management.

* API

- pool :: The fundamental pool type.

- with-garbage-pool :: ~((&optional (var '*pool*)) &body body)~

Performs a series of operations on pool. Return the values returned by the body. Possible use named
and unnamed pools.

#+begin_src lisp
(with-garbage-pool () (cleanup-register myobj clenup-fun))
(with-garbage-pool (mypool) (cleanup-register myobj clenup-fun mypool))
#+end_src

- cleanup-register :: ~(object cleanup-fun &optional (pool *pool*))~

Register a function to be called when a pool is cleared. Return object.

#+begin_src lisp
(with-garbage-pool ()
  (cleanup-register (cffi:foreign-string-alloc "Hello world") #'cffi:foreign-string-free) ...)
#+end_src


- cleanup-pool :: ~(&optional (pool *pool*))~

Run all the cleanups and clear pool.

- cleanup-object :: ~(object &optional (pool *pool*))~

Run the specified cleanup function immediately and unregister it. Use object instead of the object
that was registered with the cleanup.

#+begin_src lisp
(with-garbage-pool ()
  (let ((%str (cleanup-register (cffi:foreign-string-alloc "Hello world")
                                #'cffi:foreign-string-free)))
    (clenup-object %str)))
#+end_src

- cancel-object-cleanup :: ~(object &optional (pool *pool*))~

Unregister object from pool without call cleanup function.

#+begin_src lisp
(with-garbage-pool ()
  (let ((%str (cleanup-register (cffi:foreign-string-alloc "Hello world")
                                #'cffi:foreign-string-free))) (cancel-object-clenup %str)))
#+end_src

- object-register :: ~(object &optional (pool *pool*))~

Generic function for object registration without cleanup functions. It is use when cleanup functions
possibly determine from type of the object (by default supports only pool and stream types). Return
object.

#+begin_src lisp
(with-garbage-pool () (let ((stream (object-register (open #P"/tmp/data")))) ...))
#+end_src


- defcleanup :: ~(class cleanup-fun)~

Bind clenup functions with object type. Necessary for use ~object-register~.

#+begin_src lisp
(defcleanup stream #'close)
#+end_src


Next: , Previous: , Up: Top   [Contents][Index]

2 Systems

The main system appears first, followed by any subsystem dependency.


Previous: , Up: Systems   [Contents][Index]

2.1 garbage-pools

Author

Andrey Moskvitin <archimag@gmail.com>

Home Page

https://github.com/archimag/garbage-pools

License

MIT

Description

GARBAGE-POOLS is Common Lisp re-implementation of the APR Pools for resource management.

Version

0.1.2

Source

garbage-pools.asd (file)

Component

garbage-pools.lisp (file)


Next: , Previous: , Up: Top   [Contents][Index]

3 Files

Files are sorted by type and then listed depth-first from the systems components trees.


Previous: , Up: Files   [Contents][Index]

3.1 Lisp


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.1 garbage-pools.asd

Location

garbage-pools.asd

Systems

garbage-pools (system)

Packages

garbage-pools-asd


Previous: , Up: Lisp files   [Contents][Index]

3.1.2 garbage-pools/garbage-pools.lisp

Parent

garbage-pools (system)

Location

garbage-pools.lisp

Packages

garbage-pools

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Top   [Contents][Index]

4 Packages

Packages are listed by definition order.


Next: , Previous: , Up: Packages   [Contents][Index]

4.1 garbage-pools-asd

Source

garbage-pools.asd

Use List

Previous: , Up: Packages   [Contents][Index]

4.2 garbage-pools

Source

garbage-pools.lisp (file)

Use List

common-lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Top   [Contents][Index]

5 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


Next: , Previous: , Up: Definitions   [Contents][Index]

5.1 Exported definitions


Next: , Previous: , Up: Exported definitions   [Contents][Index]

5.1.1 Macros

Macro: defcleanup CLASS CLEANUP-FUN
Package

garbage-pools

Source

garbage-pools.lisp (file)

Macro: with-garbage-pool (&optional VAR) &body BODY
Package

garbage-pools

Source

garbage-pools.lisp (file)


Next: , Previous: , Up: Exported definitions   [Contents][Index]

5.1.2 Functions

Function: cancel-object-cleanup OBJECT &optional POOL
Package

garbage-pools

Source

garbage-pools.lisp (file)

Function: cleanup-object OBJECT &optional POOL
Package

garbage-pools

Source

garbage-pools.lisp (file)

Function: cleanup-pool &optional POOL
Package

garbage-pools

Source

garbage-pools.lisp (file)

Function: cleanup-register OBJECT CLEANUP-FUN &optional POOL
Package

garbage-pools

Source

garbage-pools.lisp (file)


Next: , Previous: , Up: Exported definitions   [Contents][Index]

5.1.3 Generic functions

Generic Function: object-register OBJECT &optional POOL
Package

garbage-pools

Source

garbage-pools.lisp (file)

Methods
Method: object-register (OBJECT stream) &optional POOL
Method: object-register (OBJECT pool) &optional POOL
Method: object-register (EMPTY (eql nil)) &optional POOL

Previous: , Up: Exported definitions   [Contents][Index]

5.1.4 Classes

Class: pool ()
Package

garbage-pools

Source

garbage-pools.lisp (file)

Direct superclasses

standard-object (class)

Direct methods
Direct slots
Slot: register-pairs
Readers

register-pairs (generic function)

Writers

(setf register-pairs) (generic function)


Previous: , Up: Definitions   [Contents][Index]

5.2 Internal definitions


Next: , Previous: , Up: Internal definitions   [Contents][Index]

5.2.1 Special variables

Special Variable: *pool*
Package

garbage-pools

Source

garbage-pools.lisp (file)


Previous: , Up: Internal definitions   [Contents][Index]

5.2.2 Generic functions

Generic Function: register-pairs OBJECT
Generic Function: (setf register-pairs) NEW-VALUE OBJECT
Package

garbage-pools

Methods
Method: register-pairs (POOL pool)

automatically generated reader method

Source

garbage-pools.lisp (file)

Method: (setf register-pairs) NEW-VALUE (POOL pool)

automatically generated writer method

Source

garbage-pools.lisp (file)


Previous: , Up: Top   [Contents][Index]

Appendix A Indexes


Next: , Previous: , Up: Indexes   [Contents][Index]

A.1 Concepts

Jump to:   F   G   L  
Index Entry  Section

F
File, Lisp, garbage-pools.asd: The garbage-pools․asd file
File, Lisp, garbage-pools/garbage-pools.lisp: The garbage-pools/garbage-pools․lisp file

G
garbage-pools.asd: The garbage-pools․asd file
garbage-pools/garbage-pools.lisp: The garbage-pools/garbage-pools․lisp file

L
Lisp File, garbage-pools.asd: The garbage-pools․asd file
Lisp File, garbage-pools/garbage-pools.lisp: The garbage-pools/garbage-pools․lisp file

Jump to:   F   G   L  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.2 Functions

Jump to:   (  
C   D   F   G   M   O   R   W  
Index Entry  Section

(
(setf register-pairs): Internal generic functions
(setf register-pairs): Internal generic functions

C
cancel-object-cleanup: Exported functions
cleanup-object: Exported functions
cleanup-pool: Exported functions
cleanup-register: Exported functions

D
defcleanup: Exported macros

F
Function, cancel-object-cleanup: Exported functions
Function, cleanup-object: Exported functions
Function, cleanup-pool: Exported functions
Function, cleanup-register: Exported functions

G
Generic Function, (setf register-pairs): Internal generic functions
Generic Function, object-register: Exported generic functions
Generic Function, register-pairs: Internal generic functions

M
Macro, defcleanup: Exported macros
Macro, with-garbage-pool: Exported macros
Method, (setf register-pairs): Internal generic functions
Method, object-register: Exported generic functions
Method, object-register: Exported generic functions
Method, object-register: Exported generic functions
Method, register-pairs: Internal generic functions

O
object-register: Exported generic functions
object-register: Exported generic functions
object-register: Exported generic functions
object-register: Exported generic functions

R
register-pairs: Internal generic functions
register-pairs: Internal generic functions

W
with-garbage-pool: Exported macros

Jump to:   (  
C   D   F   G   M   O   R   W  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.3 Variables

Jump to:   *  
R   S  
Index Entry  Section

*
*pool*: Internal special variables

R
register-pairs: Exported classes

S
Slot, register-pairs: Exported classes
Special Variable, *pool*: Internal special variables

Jump to:   *  
R   S  

Previous: , Up: Indexes   [Contents][Index]

A.4 Data types

Jump to:   C   G   P   S  
Index Entry  Section

C
Class, pool: Exported classes

G
garbage-pools: The garbage-pools system
garbage-pools: The garbage-pools package
garbage-pools-asd: The garbage-pools-asd package

P
Package, garbage-pools: The garbage-pools package
Package, garbage-pools-asd: The garbage-pools-asd package
pool: Exported classes

S
System, garbage-pools: The garbage-pools system

Jump to:   C   G   P   S