[vte] [ring] Invalidate cache
- From: Behdad Esfahbod <behdad src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [vte] [ring] Invalidate cache
- Date: Tue, 8 Sep 2009 06:42:32 +0000 (UTC)
commit 284b9bbb884d36e65af13e968304b74ddb5be1c7
Author: Behdad Esfahbod <behdad behdad org>
Date: Tue Sep 8 01:42:25 2009 -0400
[ring] Invalidate cache
src/ring.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/src/ring.c b/src/ring.c
index 029ca25..75bb805 100644
--- a/src/ring.c
+++ b/src/ring.c
@@ -533,7 +533,7 @@ _vte_ring_chunk_new_compact (guint start)
free_chunk_compact = (VteRingChunkCompact *) chunk->base.next_chunk;
num_free_chunk_compact--;
} else {
- chunk = malloc (VTE_POOL_BYTES);
+ chunk = g_malloc (VTE_POOL_BYTES);
chunk->total_bytes = VTE_POOL_BYTES - G_STRUCT_OFFSET (VteRingChunkCompact, p);
}
@@ -915,6 +915,10 @@ _vte_ring_uncompact_one_row (VteRing *ring)
head->start--;
+ if (head->start == ring->cached_row_num)
+ /* Invalidate cached row */
+ ring->cached_row_num = (guint) -1;
+
row = _vte_ring_chunk_writable_index (head, head->start);
_vte_row_data_clear (row);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]