From: Lynn Winebarger <owinebar@gmail.com>
To: Adam Porter <adam@alphapapa.net>
Cc: emacs-devel@gnu.org
Subject: Re: [GNU ELPA] New package: tam
Date: Tue, 19 Sep 2023 11:48:26 -0400 [thread overview]
Message-ID: <CAM=F=bBZqf_guTLuRVOXEiafY0SRXguBL-haK+vcpstaHP1TzA@mail.gmail.com> (raw)
In-Reply-To: <b2774a80-3bdc-36a1-a710-4d4c5a2ac303@alphapapa.net>
On Mon, Sep 18, 2023 at 3:26 PM Adam Porter <adam@alphapapa.net> wrote:
>
> Hi Lynn,
>
> This looks like a very interesting package. My only feedback is
> trivial: that the names of the functions could omit "table" from their
> names, because it would make them more concise; and since they all
> operate on tables, it doesn't seem necessary for their names to specify
> that.
>
Thanks for taking a look. The reason is that I was thinking about
adding functionality for pools of preallocated objects that leverage
the tables for tracking which objects are actually being used. I went
ahead and wrote some basic support for such pools in the latest
version pushed.
It's possible the two data structures (tables and pools) could be
unified, but I want the tables to be able to track arbitrary data
associated with some nominal limited resource - the slots are
preallocated, but any other associated data is not. For the scheduler
example, I may allow 24 simultaneous async processes to run, but I
could construct hundreds or thousands of job specifications that are
waiting to get scheduled. I might use the pool object to pre-allocate
some largish number of those to avoid any allocation in a process
sentinel.
Of course, this introduces the possibility of use-after-free and using
unallocated objects (they are represented by simple indexes), so this
structure should only be used with appropriate caution.
Lynn
next prev parent reply other threads:[~2023-09-19 15:48 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-18 2:28 [GNU ELPA] New package: tam Lynn Winebarger
2023-09-18 9:37 ` Philip Kaludercic
2023-09-18 16:22 ` Lynn Winebarger
2023-09-18 17:02 ` Philip Kaludercic
2023-09-19 15:38 ` Lynn Winebarger
2023-09-20 8:26 ` Philip Kaludercic
2023-09-20 16:14 ` Lynn Winebarger
2023-09-20 17:30 ` Stefan Monnier via Emacs development discussions.
2023-09-21 4:21 ` Lynn Winebarger
2023-09-21 13:59 ` Stefan Monnier
2023-09-22 3:01 ` Lynn Winebarger
2023-09-22 3:23 ` Stefan Monnier
2023-09-21 16:38 ` Philip Kaludercic
2023-09-18 19:26 ` Adam Porter
2023-09-19 15:48 ` Lynn Winebarger [this message]
2023-09-19 16:29 ` Adam Porter
2023-09-21 20:26 ` Richard Stallman
2023-09-22 19:45 ` Adam Porter
2023-09-20 16:06 ` Stefan Monnier
2023-09-20 16:44 ` Lynn Winebarger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAM=F=bBZqf_guTLuRVOXEiafY0SRXguBL-haK+vcpstaHP1TzA@mail.gmail.com' \
--to=owinebar@gmail.com \
--cc=adam@alphapapa.net \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).