mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-07-28 00:21:53 +03:00
added xmlMallocAtomic() to be used when allocating blocks which do not
* DOCBparser.c HTMLparser.c c14n.c catalog.c encoding.c globals.c nanohttp.c parser.c parserInternals.c relaxng.c tree.c uri.c xmlmemory.c xmlreader.c xmlregexp.c xpath.c xpointer.c include/libxml/globals.h include/libxml/xmlmemory.h: added xmlMallocAtomic() to be used when allocating blocks which do not contains pointers, add xmlGcMemSetup() and xmlGcMemGet() to allow registering the full set of functions needed by a garbage collecting allocator like libgc, ref #109944 Daniel
This commit is contained in:
@ -283,7 +283,7 @@ xmlUTF8Strndup(const xmlChar *utf, int len) {
|
||||
|
||||
if ((utf == NULL) || (len < 0)) return(NULL);
|
||||
i = xmlUTF8Strsize(utf, len);
|
||||
ret = (xmlChar *) xmlMalloc((i + 1) * sizeof(xmlChar));
|
||||
ret = (xmlChar *) xmlMallocAtomic((i + 1) * sizeof(xmlChar));
|
||||
if (ret == NULL) {
|
||||
xmlGenericError(xmlGenericErrorContext,
|
||||
"malloc of %ld byte failed\n",
|
||||
|
Reference in New Issue
Block a user