summaryrefslogtreecommitdiff
path: root/src/sljit/sljitLir.c
diff options
context:
space:
mode:
authorzherczeg <zherczeg@6239d852-aaf2-0410-a92c-79f79f948069>2015-03-06 07:41:36 +0000
committerzherczeg <zherczeg@6239d852-aaf2-0410-a92c-79f79f948069>2015-03-06 07:41:36 +0000
commit54f5af13d8b61ba4078e59e89b718c729449e399 (patch)
treefa3363b6c2077836d1aee5a2a18aa982b9ce2694 /src/sljit/sljitLir.c
parente917562d38f048b304bd14b458713349ad6869be (diff)
downloadpcre2-54f5af13d8b61ba4078e59e89b718c729449e399.tar.gz
Remove computing the JIT read-only data size in advance and use on-demand memory allocation.
git-svn-id: svn://vcs.exim.org/pcre2/code/trunk@213 6239d852-aaf2-0410-a92c-79f79f948069
Diffstat (limited to 'src/sljit/sljitLir.c')
-rw-r--r--src/sljit/sljitLir.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/sljit/sljitLir.c b/src/sljit/sljitLir.c
index 8112e8d..5039a7e 100644
--- a/src/sljit/sljitLir.c
+++ b/src/sljit/sljitLir.c
@@ -435,6 +435,12 @@ SLJIT_API_FUNC_ATTRIBUTE void sljit_free_compiler(struct sljit_compiler *compile
SLJIT_FREE(compiler, allocator_data);
}
+SLJIT_API_FUNC_ATTRIBUTE void sljit_set_compiler_memory_error(struct sljit_compiler *compiler)
+{
+ if (compiler->error == SLJIT_SUCCESS)
+ compiler->error = SLJIT_ERR_ALLOC_FAILED;
+}
+
#if (defined SLJIT_CONFIG_ARM_THUMB2 && SLJIT_CONFIG_ARM_THUMB2)
SLJIT_API_FUNC_ATTRIBUTE void sljit_free_code(void* code)
{