}
}
- reg->string_pool = pool;
+ reg->string_pool = pool;
+ reg->string_pool_end = pool + size;
return 0;
}
ops_free(reg);
if (IS_NOT_NULL(reg->string_pool)) {
xfree(reg->string_pool);
- reg->string_pool = 0;
+ reg->string_pool_end = reg->string_pool = 0;
}
if (IS_NOT_NULL(reg->exact)) xfree(reg->exact);
if (IS_NOT_NULL(reg->repeat_range)) xfree(reg->repeat_range);
reg->ops_used = 0;
reg->string_pool = 0;
+ reg->string_pool_end = 0;
reg->num_mem = 0;
reg->num_repeat = 0;
reg->num_null_check = 0;
unsigned int ops_used; /* used space for ops */
unsigned int ops_alloc; /* allocated space for ops */
unsigned char* string_pool;
+ unsigned char* string_pool_end;
int num_mem; /* used memory(...) num counted from 1 */
int num_repeat; /* OP_REPEAT/OP_REPEAT_NG id-counter */