As far as I know CursorWindow holds the whole query result set in memory and it has a memory size limitation for that. I think part of the reason why query result data is kept in memory is that SQLite doesn't allow its "native" cursor position to go back once moved forward (in JDBC terms SQLite only allows FORWARD_ONLY for its ResultSets).
But jumping back or at an arbitrary position is necessary for making all these cursor-based adapters work on Android. I think that's one of the reasons why CursorWindow holds the whole result set in memory so its items can be randomly accessed. Judging your log I think you should not query these text/blob fields because they really bloat the CursorWindow. Do you really need to load and display items with about 70000 bytes of text in your ListView? If not then truncate that text in your query or pre-process "summary" data in a temporary table and load that instead or something like that. On Thursday, August 2, 2012 2:14:06 AM UTC-5, Rajis wrote: > > Hi All > > I am using listview to store more then 50 item into the listview its > working but after inserting the 20th item the erros showing in the log cat > like this. > > > 08-02 12:50:34.646: E/CursorWindow(5245): not growing since there are > already 16 row(s), max size 1048576 > 08-02 12:50:34.646: E/Cursor(5245): Failed allocating 69485 bytes for > text/blob at 24,8 > 08-02 12:50:34.695: D/Cursor(5245): finish_program_and_get_row_count row 25 > 08-02 12:50:35.355: D/Cursor(5245): skip_rows row 8 > 08-02 12:50:35.365: E/CursorWindow(5245): need to grow: mSize = 1048576, > size = 69485, freeSpace() = 9795, numRows = 16 > 08-02 12:50:35.365: E/CursorWindow(5245): not growing since there are > already 16 row(s), max size 1048576 > 08-02 12:50:35.365: E/Cursor(5245): Failed allocating 69485 bytes for > text/blob at 23,8 > 08-02 12:50:35.396: D/Cursor(5245): finish_program_and_get_row_count row 26 > 08-02 12:50:35.896: D/Cursor(5245): skip_rows row 7 > 08-02 12:50:35.905: E/CursorWindow(5245): need to grow: mSize = 1048576, > size = 69485, freeSpace() = 9795, numRows = 16 > 08-02 12:50:35.905: E/CursorWindow(5245): not growing since there are > already 16 row(s), max size 1048576 > 08-02 12:50:35.905: E/Cursor(5245): Failed allocating 69485 bytes for > text/blob at 22,8 > 08-02 12:50:35.936: D/Cursor(5245): finish_program_and_get_row_count row 27 > 08-02 12:50:36.425: D/Cursor(5245): skip_rows row 6 > 08-02 12:50:36.436: E/CursorWindow(5245): need to grow: mSize = 1048576, > size = 69485, freeSpace() = 9795, numRows = 16 > > > and also the application is very slow to load. Help me. > -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

