mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-10-09 07:42:21 +03:00
multibit, fatbit: make _size build-time only
This commit makes mmbit_size() and fatbit_size compile-time only, and adds a resource limit for very large multibits.
This commit is contained in:
committed by
Matthew Barr
parent
8b7b06d2a4
commit
e271781d95
@@ -40,6 +40,10 @@
|
||||
#include "multibit.h"
|
||||
#include "ue2common.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define MIN_FAT_SIZE 32
|
||||
|
||||
struct fatbit {
|
||||
@@ -82,11 +86,8 @@ u32 fatbit_iterate(const struct fatbit *bits, u32 total_bits, u32 it_in) {
|
||||
return mmbit_iterate(bits->fb_int.raw, total_bits, it_in);
|
||||
}
|
||||
|
||||
/** \brief Return the size in bytes of a fatbit that can store the given
|
||||
* number of bits.
|
||||
*
|
||||
* Not for use in performance-critical code, implementation is in fatbit.c.
|
||||
*/
|
||||
u32 fatbit_size(u32 total_bits);
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user