From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Philipp Stephani
<= /div>Paul Eggert <eggert@cs.ucla.edu> schri= eb am Mo., 9. Okt. 2017 um 08:19=C2=A0Uhr:Philipp Stephani wrote:
> I don't think Jansson can use xmalloc because xmalloc can exit non= locally,
> which is not expected by a third-party library such as Jansson. It cou= ld
> use a suitable wrapper of lmalloc, though.
That would be overkill, as lmalloc arranges for Lisp alignment, which Janss= on
does not need. We could define new functions (smalloc and srealloc, say), t= hat
act like malloc and realloc except they return NULL for requests larger tha= n
PTRDIFF_MAX. Right now, I expect only the JSON code needs this sort of thin= g so
we could put the new functions in json.c. If other code needs it later we c= ould
move these new functions to alloc.c.Yes, that sounds reas= onable.=C2=A0