HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
thi-ng
tinyalloc
C2019–2019
thi-ng / tinyalloc

tinyalloc

malloc / free replacement for unmanaged, linear memory situations (e.g. WASM, embedded devices...)

4Distinct people
4Mentions
0Explicit recommenders
819GitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

malloc / free replacement for unmanaged, linear memory situations (e.g. WASM, embedded devices...)

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 12:54:37 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by hour4 dated mentions

Observed mentions: 2019-01-06 14:46:58 UTC to 2019-01-07 15:51:35 UTC.

0122019-01-06 14:00:00 UTC to 2019-01-06 15:00:00 UTC (exclusive): 1 mentions; 1 submissions, 0 commentsJan 6, 14:002019-01-06 15:00:00 UTC to 2019-01-06 16:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2019-01-06 16:00:00 UTC to 2019-01-06 17:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2019-01-06 17:00:00 UTC to 2019-01-06 18:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2019-01-06 18:00:00 UTC to 2019-01-06 19:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments2019-01-06 19:00:00 UTC to 2019-01-06 20:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2019-01-06 20:00:00 UTC to 2019-01-06 21:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2019-01-06 21:00:00 UTC to 2019-01-06 22:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2019-01-06 22:00:00 UTC to 2019-01-06 23:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2019-01-06 23:00:00 UTC to 2019-01-07 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2019-01-07 00:00:00 UTC to 2019-01-07 01:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2019-01-07 01:00:00 UTC to 2019-01-07 02:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2019-01-07 02:00:00 UTC to 2019-01-07 03:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 commentsJan 7, 02:002019-01-07 03:00:00 UTC to 2019-01-07 04:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2019-01-07 04:00:00 UTC to 2019-01-07 05:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2019-01-07 05:00:00 UTC to 2019-01-07 06:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2019-01-07 06:00:00 UTC to 2019-01-07 07:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2019-01-07 07:00:00 UTC to 2019-01-07 08:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2019-01-07 08:00:00 UTC to 2019-01-07 09:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2019-01-07 09:00:00 UTC to 2019-01-07 10:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2019-01-07 10:00:00 UTC to 2019-01-07 11:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2019-01-07 11:00:00 UTC to 2019-01-07 12:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2019-01-07 12:00:00 UTC to 2019-01-07 13:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2019-01-07 13:00:00 UTC to 2019-01-07 14:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2019-01-07 14:00:00 UTC to 2019-01-07 15:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2019-01-07 15:00:00 UTC to 2019-01-07 16:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 commentsJan 7, 15:00

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
Jan 6, 14:002019-01-06 14:00:00 UTC2019-01-06 15:00:00 UTC110
Jan 6, 15:002019-01-06 15:00:00 UTC2019-01-06 16:00:00 UTC000
Jan 6, 16:002019-01-06 16:00:00 UTC2019-01-06 17:00:00 UTC000
Jan 6, 17:002019-01-06 17:00:00 UTC2019-01-06 18:00:00 UTC000
Jan 6, 18:002019-01-06 18:00:00 UTC2019-01-06 19:00:00 UTC202
Jan 6, 19:002019-01-06 19:00:00 UTC2019-01-06 20:00:00 UTC000
Jan 6, 20:002019-01-06 20:00:00 UTC2019-01-06 21:00:00 UTC000
Jan 6, 21:002019-01-06 21:00:00 UTC2019-01-06 22:00:00 UTC000
Jan 6, 22:002019-01-06 22:00:00 UTC2019-01-06 23:00:00 UTC000
Jan 6, 23:002019-01-06 23:00:00 UTC2019-01-07 00:00:00 UTC000
Jan 7, 00:002019-01-07 00:00:00 UTC2019-01-07 01:00:00 UTC000
Jan 7, 01:002019-01-07 01:00:00 UTC2019-01-07 02:00:00 UTC000
Jan 7, 02:002019-01-07 02:00:00 UTC2019-01-07 03:00:00 UTC000
Jan 7, 03:002019-01-07 03:00:00 UTC2019-01-07 04:00:00 UTC000
Jan 7, 04:002019-01-07 04:00:00 UTC2019-01-07 05:00:00 UTC000
Jan 7, 05:002019-01-07 05:00:00 UTC2019-01-07 06:00:00 UTC000
Jan 7, 06:002019-01-07 06:00:00 UTC2019-01-07 07:00:00 UTC000
Jan 7, 07:002019-01-07 07:00:00 UTC2019-01-07 08:00:00 UTC000
Jan 7, 08:002019-01-07 08:00:00 UTC2019-01-07 09:00:00 UTC000
Jan 7, 09:002019-01-07 09:00:00 UTC2019-01-07 10:00:00 UTC000
Jan 7, 10:002019-01-07 10:00:00 UTC2019-01-07 11:00:00 UTC000
Jan 7, 11:002019-01-07 11:00:00 UTC2019-01-07 12:00:00 UTC000
Jan 7, 12:002019-01-07 12:00:00 UTC2019-01-07 13:00:00 UTC000
Jan 7, 13:002019-01-07 13:00:00 UTC2019-01-07 14:00:00 UTC000
Jan 7, 14:002019-01-07 14:00:00 UTC2019-01-07 15:00:00 UTC000
Jan 7, 15:002019-01-07 15:00:00 UTC2019-01-07 16:00:00 UTC101

What Hacker News says

4 sources
Hey, author here - this post/thread completely hit my by surprise, so apols for late reply: 1) ta_free() is only O(n) if block compaction is enabled, else it's O(1), i.e. a simple cons of the freed block addr to the free list (https://github.com/thi-ng/tinyalloc/blob/master/tinyalloc.c#...) 2) there's no hardcoded alignment (it's configurable via TA_ALIGN macro) and I'm confused about your other comment about not aligning the right address in general. that's a wrong observation and i think you misunderstood the diagram in the readme. 3) it's clearly stated in the readme that this is largely meant for memory constrained situations (or where not large numbers of blocks, realloc or multithreading is needed/available) and so it's not meant to be a replacement for dlmalloc / jemalloc caliber allocators etc. i needed something small & lightweig
Read the rest
ht and it did it's job very well in several production projects on the ARM STM32 platform (where I have upto around 8MB managed). I also found it very useful for some ongoing JS/WASM interop projects (i.e. there's JS version here: https://github.com/thi-ng/umbrella/blob/master/packages/mall...)
In Tinyalloc: replacement for malloc/free in unmanaged, linear memory situations

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.