Reduce buffer size to 20, add "deleting" to the log
This commit is contained in:
@@ -98,7 +98,8 @@ _buffer_add(ProfBuff buffer, const char* show_char, int pad_indent, GDateTime* t
|
|||||||
buffer->lines += e->_lines;
|
buffer->lines += e->_lines;
|
||||||
|
|
||||||
// With 10% margin to ensure overflow prevention
|
// With 10% margin to ensure overflow prevention
|
||||||
while (buffer->lines >= PAD_SIZE - (PAD_SIZE / 10) && g_slist_length(buffer->entries) > 1) {
|
while (buffer->lines >= 20 && g_slist_length(buffer->entries) > 1) {
|
||||||
|
log_debug("DELETING");
|
||||||
// Delete message from the opposite size to free buffer
|
// Delete message from the opposite size to free buffer
|
||||||
GSList* buffer_entry_to_delete = append ? buffer->entries : g_slist_last(buffer->entries);
|
GSList* buffer_entry_to_delete = append ? buffer->entries : g_slist_last(buffer->entries);
|
||||||
ProfBuffEntry* entry_to_delete = (ProfBuffEntry*)buffer_entry_to_delete->data;
|
ProfBuffEntry* entry_to_delete = (ProfBuffEntry*)buffer_entry_to_delete->data;
|
||||||
|
|||||||
Reference in New Issue
Block a user