-
Notifications
You must be signed in to change notification settings - Fork 765
Description
According to the documentation a custom allocator can be used but there is no way to know if a custom allocator is being used.
According to docs:
hs_error_t hs_serialized_database_info(const char *bytes, size_t length, char **info)
Utility function providing information about a serialized database.
Parameters
bytes – Pointer to a serialized database.
length – Length in bytes of the serialized database.
info – On success, a string containing the version and platform information for the supplied serialized database is placed in the parameter. The string is allocated using the allocator supplied in hs_set_misc_allocator() (or malloc() if no allocator was set) and should be freed by the caller.
Returns
HS_SUCCESS on success, other values on failure.
The string is allocated using the allocator supplied in hs_set_misc_allocator() however hs_misc_free is not exposed.
Since hs_misc_free is not exposed you have to assume free() it would be far better if hs_misc_free was exposed to be used to free the memory.
The free free function should be exposed for any custom allocator overrides.