commit | 50eeba2a86489ceaf13421bc7ea397f94df81c40 | [log] [tgz] |
---|---|---|
author | Nguyen Anh Quynh <aquynh@gmail.com> | Tue Sep 30 13:28:02 2014 +0800 |
committer | Nguyen Anh Quynh <aquynh@gmail.com> | Tue Sep 30 13:28:02 2014 +0800 |
tree | 5020f89369e67aa8483c75fa88b4a3a74b9fb9e6 | |
parent | ac98ca01292b51ff18d3ff28dba2e8f4647e54e1 [diff] [blame] |
avoid setting instruction cache size to @count when Capstone uses user-customized memory management, which might fail in resource scarce env such as kernel
diff --git a/cs.c b/cs.c index 60dee78..8881790 100644 --- a/cs.c +++ b/cs.c
@@ -436,8 +436,10 @@ handle->errnum = CS_ERR_OK; +#ifdef CAPSTONE_USE_SYS_DYN_MEM if (count > 0) cache_size = count; +#endif // save the original offset for SKIPDATA buffer_org = buffer;