The bodge-memory Reference Manual

This is the bodge-memory Reference Manual, version 1.0.0, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 08 16:30:46 2024 GMT+0.

Table of Contents


1 Introduction


2 Systems

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


2.1 bodge-memory

Memory handling utilities

Author

Pavel Korolev

Contact

License

MIT

Version

1.0.0

Dependencies
  • bodge-utilities (system).
  • trivial-garbage (system).
Source

bodge-memory.asd.

Child Components

3 Files

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


3.1 Lisp


3.1.1 bodge-memory/bodge-memory.asd

Source

bodge-memory.asd.

Parent Component

bodge-memory (system).

ASDF Systems

bodge-memory.


3.1.2 bodge-memory/packages.lisp

Source

bodge-memory.asd.

Parent Component

bodge-memory (system).

Packages

bodge-memory.


3.1.3 bodge-memory/disposable.lisp

Dependency

packages.lisp (file).

Source

bodge-memory.asd.

Parent Component

bodge-memory (system).

Public Interface
Internals

3.1.4 bodge-memory/foreign-array.lisp

Dependency

disposable.lisp (file).

Source

bodge-memory.asd.

Parent Component

bodge-memory (system).

Public Interface
Internals

4 Packages

Packages are listed by definition order.


4.1 bodge-memory

Source

packages.lisp.

Use List
  • bodge-util.
  • common-lisp.
  • static-vectors.
  • trivial-garbage.
Public Interface
Internals

5 Definitions

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


5.1 Public Interface


5.1.1 Special variables

Special Variable: *auto-initialize-destructor*
Package

bodge-memory.

Source

disposable.lisp.

Special Variable: *explicit-dispose-p*
Package

bodge-memory.

Source

disposable.lisp.


5.1.2 Macros

Macro: define-destructor (class-name (&rest slots) &body body)

Define destructor for the objects of ‘class-name‘. ‘class-name‘ should be a subclass of ’disposable.

Destructor can be invoked manually by calling ‘#’dispose‘ or automatically during garbage collection. ‘slots‘ (slot names of the object instance) should be set during instance initialization and cannot be null.

Package

bodge-memory.

Source

disposable.lisp.

Macro: with-disposable ((&rest bindings) &body body)

let*-like bindings that will be disposed at the end of ‘with-disposable‘ block in reverse order

Package

bodge-memory.

Source

disposable.lisp.


5.1.3 Ordinary functions

Function: dispose (obj)

Call destructor for object ‘obj‘.

Package

bodge-memory.

Source

disposable.lisp.

Function: disposedp (disposable)
Package

bodge-memory.

Source

disposable.lisp.

Function: initialize-destructor (instance)
Package

bodge-memory.

Source

disposable.lisp.

Function: make-foreign-array (length &key element-type initial-element initial-contents)
Package

bodge-memory.

Source

foreign-array.lisp.


5.1.4 Generic functions

Generic Function: foreign-pointer-of (object)
Package

bodge-memory.

Source

foreign-array.lisp.

Methods
Method: foreign-pointer-of ((this foreign-array))
Method: foreign-pointer-of ((object null))
Generic Reader: simple-array-of (object)
Package

bodge-memory.

Methods
Reader Method: simple-array-of ((foreign-array foreign-array))

automatically generated reader method

Source

foreign-array.lisp.

Target Slot

array.


5.1.5 Standalone methods

Method: initialize-instance :around ((this disposable) &key)
Source

disposable.lisp.


5.1.6 Classes

Class: disposable
Package

bodge-memory.

Source

disposable.lisp.

Direct subclasses

foreign-array.

Direct methods

initialize-instance.

Direct slots
Slot: finalized-p
Initform

(bodge-memory::make-holder)

Class: disposable-container
Package

bodge-memory.

Source

disposable.lisp.

Direct slots
Slot: disposables
Initform

(trivial-garbage:make-weak-hash-table :weakness :key)


5.2 Internals


5.2.1 Ordinary functions

Function: %ensure-slot-not-null (object slot)
Package

bodge-memory.

Source

disposable.lisp.

Function: %ensure-value-not-null (value)
Package

bodge-memory.

Source

disposable.lisp.

Function: copy-holder (instance)
Package

bodge-memory.

Source

disposable.lisp.

Function: holder-p (object)
Package

bodge-memory.

Source

disposable.lisp.

Reader: holder-value (instance)
Writer: (setf holder-value) (instance)
Package

bodge-memory.

Source

disposable.lisp.

Target Slot

value.

Function: make-holder (&key value)
Package

bodge-memory.

Source

disposable.lisp.


5.2.2 Generic functions

Generic Function: destructor-of (obj)
Package

bodge-memory.

Source

disposable.lisp.

Methods
Method: destructor-of ((this0 foreign-array))
Source

foreign-array.lisp.

Method: destructor-of (obj)

5.2.3 Structures

Structure: holder
Package

bodge-memory.

Source

disposable.lisp.

Direct superclasses

structure-object.

Direct slots
Slot: value
Type

boolean

Readers

holder-value.

Writers

(setf holder-value).


5.2.4 Classes

Class: foreign-array
Package

bodge-memory.

Source

foreign-array.lisp.

Direct superclasses

disposable.

Direct methods
Direct slots
Slot: array
Package

common-lisp.

Type

(simple-array * *)

Initargs

:array

Readers

simple-array-of.

Writers

This slot is read-only.


Appendix A Indexes


A.1 Concepts


A.2 Functions

Jump to:   %   (  
C   D   F   G   H   I   M   S   W  
Index Entry  Section

%
%ensure-slot-not-null: Private ordinary functions
%ensure-value-not-null: Private ordinary functions

(
(setf holder-value): Private ordinary functions

C
copy-holder: Private ordinary functions

D
define-destructor: Public macros
destructor-of: Private generic functions
destructor-of: Private generic functions
destructor-of: Private generic functions
dispose: Public ordinary functions
disposedp: Public ordinary functions

F
foreign-pointer-of: Public generic functions
foreign-pointer-of: Public generic functions
foreign-pointer-of: Public generic functions
Function, %ensure-slot-not-null: Private ordinary functions
Function, %ensure-value-not-null: Private ordinary functions
Function, (setf holder-value): Private ordinary functions
Function, copy-holder: Private ordinary functions
Function, dispose: Public ordinary functions
Function, disposedp: Public ordinary functions
Function, holder-p: Private ordinary functions
Function, holder-value: Private ordinary functions
Function, initialize-destructor: Public ordinary functions
Function, make-foreign-array: Public ordinary functions
Function, make-holder: Private ordinary functions

G
Generic Function, destructor-of: Private generic functions
Generic Function, foreign-pointer-of: Public generic functions
Generic Function, simple-array-of: Public generic functions

H
holder-p: Private ordinary functions
holder-value: Private ordinary functions

I
initialize-destructor: Public ordinary functions
initialize-instance: Public standalone methods

M
Macro, define-destructor: Public macros
Macro, with-disposable: Public macros
make-foreign-array: Public ordinary functions
make-holder: Private ordinary functions
Method, destructor-of: Private generic functions
Method, destructor-of: Private generic functions
Method, foreign-pointer-of: Public generic functions
Method, foreign-pointer-of: Public generic functions
Method, initialize-instance: Public standalone methods
Method, simple-array-of: Public generic functions

S
simple-array-of: Public generic functions
simple-array-of: Public generic functions

W
with-disposable: Public macros