Lines Matching refs:ptr
63 #define check_se_protected(ptr, size) (0) argument
75 #define check_se_protected(ptr, size) netbsd_se_protected() argument
94 #define check_se_protected(ptr, size) generic_se_protected(ptr, size) argument
96 static SLJIT_INLINE int generic_se_protected(void *ptr, sljit_uw size) in generic_se_protected() argument
98 if (SLJIT_LIKELY(!mprotect(ptr, size, PROT_EXEC))) in generic_se_protected()
99 return mprotect(ptr, size, PROT_READ | PROT_WRITE); in generic_se_protected()
125 sljit_uw* ptr; in sljit_malloc_exec() local
135 ptr = (sljit_uw*)mmap(NULL, size, prot, MAP_PRIVATE | MAP_ANON, -1, 0); in sljit_malloc_exec()
137 if (ptr == MAP_FAILED) in sljit_malloc_exec()
142 se_protected = check_se_protected(ptr, size); in sljit_malloc_exec()
145 munmap((void *)ptr, size); in sljit_malloc_exec()
150 *ptr++ = size; in sljit_malloc_exec()
151 return ptr; in sljit_malloc_exec()
158 SLJIT_API_FUNC_ATTRIBUTE void sljit_free_exec(void* ptr) in sljit_free_exec() argument
160 sljit_uw *start_ptr = ((sljit_uw*)ptr) - 1; in sljit_free_exec()
183 sljit_uw *ptr; in sljit_malloc_exec() local
186 ptr = (sljit_uw*)VirtualAlloc(NULL, size, in sljit_malloc_exec()
189 if (!ptr) in sljit_malloc_exec()
192 *ptr++ = size; in sljit_malloc_exec()
194 return ptr; in sljit_malloc_exec()
197 SLJIT_API_FUNC_ATTRIBUTE void sljit_free_exec(void* ptr) in sljit_free_exec() argument
199 sljit_uw start = (sljit_uw)ptr - sizeof(sljit_uw); in sljit_free_exec()