[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
New GNU ELPA package: tam - Manage use of slots in a fixed size table
From: |
Sacha Chua |
Subject: |
New GNU ELPA package: tam - Manage use of slots in a fixed size table |
Date: |
Mon, 25 Sep 2023 08:45:34 -0400 |
Summary: Manage use of slots in a fixed size table
Requires: queue-0.2, emacs-24.3
Website: https://github.com/owinebar/emacs-table-allocation-manager
Keywords: lisp tools
Maintainer: Onnie Lynn Winebarger <owinebar@gmail.com>
Author: Onnie Lynn Winebarger <owinebar@gmail.com>
Table Allocation Manager
Provides an interface to managing the usage of the slots in a fixed size
table. All allocation is done during initialization to avoid triggering
garbage collection during allocation/free operations.
API:
(tam-create-table N) => table of size N
(tam-table-fullp TABLE) => nil unless TABLE is full
(tam-table-emptyp TABLE) => nil unless TABLE is empty
(tam-table-size TABLE) => number of slots in TABLE
(tam-table-used TABLE) => number of slots of TABLE in use
(tam-table-get TABLE IDX) => contents of TABLE slot at index IDX
(tam-allocate TABLE OBJ) =>
if not full, assigns OBJ to contents of a free slot in TABLE,
and returns the index of the slot
if full, returns nil
(tam-free TABLE INDEX) =>
if slot at INDEX of TABLE is in use, move to the free list and
return the object formerly held by the slot
if slot is already free, signal an error
(tam-table-free-list TABLE) => list of free indices in TABLE
(tam-table-live-list TABLE) => list of in-use indices in TABLE
---------
You are receiving this message via the info-gnu-emacs@gnu.org mailing list.
List info/preferences: https://lists.gnu.org/mailman/listinfo/info-gnu-emacs
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- New GNU ELPA package: tam - Manage use of slots in a fixed size table,
Sacha Chua <=