diff options
Diffstat (limited to 'src/3rdparty/harfbuzz-ng/src/hb-pool.hh')
-rw-r--r-- | src/3rdparty/harfbuzz-ng/src/hb-pool.hh | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/3rdparty/harfbuzz-ng/src/hb-pool.hh b/src/3rdparty/harfbuzz-ng/src/hb-pool.hh index ee43721a38..fcf10666b0 100644 --- a/src/3rdparty/harfbuzz-ng/src/hb-pool.hh +++ b/src/3rdparty/harfbuzz-ng/src/hb-pool.hh @@ -29,7 +29,16 @@ #include "hb.hh" -/* Memory pool for persistent allocation of small objects. */ +/* Memory pool for persistent allocation of small objects. + * + * Some AI musings on this, not necessarily true: + * + * This is a very simple implementation, but it's good enough for our + * purposes. It's not thread-safe. It's not very fast. It's not + * very memory efficient. It's not very cache efficient. It's not + * very anything efficient. But it's simple and it works. And it's + * good enough for our purposes. If you need something more + * sophisticated, use a real allocator. Or use a real language. */ template <typename T, unsigned ChunkLen = 32> struct hb_pool_t @@ -49,7 +58,7 @@ struct hb_pool_t if (unlikely (!next)) { if (unlikely (!chunks.alloc (chunks.length + 1))) return nullptr; - chunk_t *chunk = (chunk_t *) hb_calloc (1, sizeof (chunk_t)); + chunk_t *chunk = (chunk_t *) hb_malloc (sizeof (chunk_t)); if (unlikely (!chunk)) return nullptr; chunks.push (chunk); next = chunk->thread (); |