Custom memory allocator for libtommath

14 views
Skip to first unread message

Russell Wallace

unread,
Oct 27, 2018, 12:18:59 AM10/27/18
to lib...@googlegroups.com
What's the intended way to supply a custom memory allocator to libtommath? It looks like the XMALLOC definitions could be such, except that they are defined in tommath_private.h where client code cannot really tweak them?

Steffen Jaeckel

unread,
Oct 31, 2018, 11:52:30 AM10/31/18
to lib...@googlegroups.com, Russell Wallace
It's a similar procedure as for libtomcrypt.

You define XMALLOC/XFREE/XREALLOC to something else while compilation of
your build of libtommath which then uses these defined functions instead
of the standard ones.

Does that answer your question?

HTH
Steffen
> --
> *** Please reply-to-all at all times ***
> *** (do not pretend to know who is subscribed and who is not) ***
> *** Please avoid top-posting. ***
> ---
> You received this message because you are subscribed to the Google
> Groups "LibTom Projects" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to libtom+un...@googlegroups.com
> <mailto:libtom+un...@googlegroups.com>.
> To post to this group, send email to lib...@googlegroups.com
> <mailto:lib...@googlegroups.com>.
> Visit this group at https://groups.google.com/group/libtom.
> For more options, visit https://groups.google.com/d/optout.

--
Steffen Jaeckel - s_ja...@gmx.de
GnuPG fingerprint: C438 6A23 7ED4 3A47 5541 B942 7B2C D0DD 4BCF F59B
My OTR key has changed on 30. Sept. 2015!
jabber: jae...@jabber.ccc.de 93BA97FA F3702AB7 DCBEB7C7 291DB383 284996CB
Reply all
Reply to author
Forward
0 new messages