# Out of memory when use sqlcipher error throw

**URL:** <https://discuss.zetetic.net/t/out-of-memory-when-use-sqlcipher-error-throw/2978>\
**Category:** SQLCipher\
**Created:** [July 21, 2018, 8:16am UTC](https://discuss.zetetic.net/t/out-of-memory-when-use-sqlcipher-error-throw/2978 "2018-07-21T08:16:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![gkmbw](https://avatars.discourse-cdn.com/v4/letter/g/b77776/32.png) [@gkmbw](https://discuss.zetetic.net/u/gkmbw)\
**Post date:** [July 21, 2018, 8:16am UTC](https://discuss.zetetic.net/t/out-of-memory-when-use-sqlcipher-error-throw/2978/1 "2018-07-21T08:16:30Z")

</div>

hi i am trying to use sqlcipher to encrypt the db while ater link the static libarary ibsqlcipher.a, when do the encrypt it have some problem.  
try to use the static library libsqlcipher.a in runestone  
1: when open the MACRO SQLITE\_HAS\_CODEC for encrypt for test  
sqlite3\_open\_v2  
sqlite3\_key  
the above two cmd run ok, and create a db, but the db not encrypt.  
and then do the cmd to create table while there is something wrong when call the API  
sqlite3\_prepare\_v2  
sqlite3\_step --\> in this step return error code value 7 (out of memory)  
sqlite3\_finalize

---

<div class="post-metadata">

**Author:** ![developernotes](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.zetetic.net/developernotes/32/1309_2.png) [@developernotes](https://discuss.zetetic.net/u/developernotes)\
**Post date:** [July 24, 2018, 1:36pm UTC](https://discuss.zetetic.net/t/out-of-memory-when-use-sqlcipher-error-throw/2978/2 "2018-07-24T13:36:43Z")

</div>

Hi @gkmbw

Can you try ruling out SQLCipher by compiling without `SQLITE_HAS_CODEC` and seeing if the behavior still exists? You would not be invoking the keying API either, but I would be curious if you still experience the out of memory condition.
