summaryrefslogtreecommitdiff
path: root/src/dispextern.h
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2011-08-05 14:04:44 +0300
committerEli Zaretskii <eliz@gnu.org>2011-08-05 14:04:44 +0300
commit5009803bda518652cc6f4b9fba02c0aed185c2a3 (patch)
tree5d0443887455129a793cadd52f03f740ec5230da /src/dispextern.h
parente2e2423bf2fe3cda60737f20aeafaff64d38b35e (diff)
parent35928349678bc6ed8f621fe7d4da6a9a3fb3579d (diff)
downloademacs-5009803bda518652cc6f4b9fba02c0aed185c2a3.tar.gz
Fix bug #9221 with memory leak in bidi display.
Add code to monitor memory allocation for bidi cache shelving. src/xdisp.c (display_line): Release buffer allocated for shelved bidi cache. src/bidi.c (bidi_shelve_cache, bidi_unshelve_cache): Track total amount allocated this far in `bidi_cache_total_alloc'. (bidi_unshelve_cache): Accept an additional argument JUST_FREE; if non-zero, only free the data buffer without restoring the cache contents. All callers changed. src/dispextern.h (bidi_unshelve_cache): Update prototype. src/xdisp.c (SAVE_IT, pos_visible_p, move_it_in_display_line_to) (move_it_in_display_line, move_it_to) (move_it_vertically_backward, move_it_by_lines): Replace the call to xfree to an equivalent call to bidi_unshelve_cache. (move_it_in_display_line_to): Fix logic of returning MOVE_POS_MATCH_OR_ZV in the bidi case.
Diffstat (limited to 'src/dispextern.h')
-rw-r--r--src/dispextern.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dispextern.h b/src/dispextern.h
index 2e245479a81..ea4b11baa74 100644
--- a/src/dispextern.h
+++ b/src/dispextern.h
@@ -2978,7 +2978,7 @@ extern int bidi_mirror_char (int);
extern void bidi_push_it (struct bidi_it *);
extern void bidi_pop_it (struct bidi_it *);
extern void *bidi_shelve_cache (void);
-extern void bidi_unshelve_cache (void *);
+extern void bidi_unshelve_cache (void *, int);
/* Defined in xdisp.c */