![]() ![]() Param ptrįunctions hs_error_t hs_free_database ( hs_database_t * db ) ¶ The type of the callback function that will be used by Hyperscan to free memory regions previously allocated using the hs_alloc_t function. typedef void ( * hs_free_t ) ( void * ptr ) ¶ Param sizeĪ pointer to the region of memory allocated, or NULL on error. If Hyperscan is to be used in a multi-threaded, or similarly concurrent environment, the allocation function will need to be re-entrant, or similarly safe for concurrent use. The type of the callback function that will be used by Hyperscan to allocate more memory at runtime as required, for example in hs_open_stream() to allocate stream state. typedef void * ( * hs_alloc_t ) ( size_t size ) ¶ Generated by one of the Hyperscan compiler functions:Ī type for errors returned by Hyperscan functions. Typedefs typedef struct hs_database hs_database_t ¶ This could be related to invalid usage of stream and scratch space or invalid memory operations by users. This error indicates that there was unexpected matching behaviors. Note: in this situation, it is normal for the amount of space required to be returned in the same manner as the used space would have been returned if the call was successful. The call should be repeated with a larger provided buffer. This error indicates that there was insufficient space in the buffer. This error is returned when Hyperscan is able to detect that the current system does not support the required instruction set.Īt a minimum, Hyperscan requires Supplemental Streaming SIMD Extensions 3 (SSSE3). This error is intended as a best-effort debugging tool, not a guarantee. Note: Not all concurrent uses of scratch regions may be detected. This error is returned when Hyperscan is able to detect that the scratch region given is already in use by another Hyperscan API call.Ī separate scratch region, allocated with hs_alloc_scratch() or hs_clone_scratch(), is required for every concurrent caller of the Hyperscan API.įor example, this error might be returned when hs_scan() has been called inside a callback delivered by a currently-executing hs_scan() call using the same scratch region. The memory allocator (either malloc() or the allocator set with hs_set_allocator()) did not correctly return memory suitably aligned for the largest representable data type on this platform. HS_BAD_ALIGNĪ parameter passed to this function was not correctly aligned. This error is returned when streaming calls are used with a block or vectored database and vice versa. The given database was built for a different mode of operation. The given database was built for a different platform (i.e., CPU type). ![]() The given database was built for a different version of Hyperscan. The pattern compiler failed, and the hs_compile_error_t should be inspected for more detail. This return value indicates that the target buffer was partially scanned, but that the callback function requested that scanning cease after a match was located. This error is only returned in cases where the function can detect an invalid parameter it cannot be relied upon to detect (for example) pointers to freed memory or other invalid data. HS_INVALIDĪ parameter passed to this function was invalid. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |