1
0
mirror of https://github.com/irssi/irssi.git synced 2024-09-01 04:14:16 -04:00

Reduce some memory waste in the scrollback buffer.

Formerly, TEXT_CHUNK_REC was slightly more than a page.
Due to glib changes (GMemChunk -> GSlice), this is now
malloced directly, and many mallocs round up allocations
larger than a page to page boundaries.
On a whole this seems to save about 10%.


git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@4853 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Jilles Tjoelker 2008-05-30 23:17:37 +00:00 committed by jilles
parent 7bf2ef0f6d
commit 278dfd7f76

View File

@ -1,7 +1,9 @@
#ifndef __TEXTBUFFER_H
#define __TEXTBUFFER_H
#define LINE_TEXT_CHUNK_SIZE 16384
/* Make sure TEXT_CHUNK_REC is not slightly more than a page, as that
wastes a lot of memory. */
#define LINE_TEXT_CHUNK_SIZE (16384 - 16)
#define LINE_COLOR_BG 0x20
#define LINE_COLOR_DEFAULT 0x10