From 8efc49036128b8827c71e9a18a93953073132fa4 Mon Sep 17 00:00:00 2001 From: "Carlos R. Mafra" Date: Fri, 4 Sep 2009 15:02:00 +0200 Subject: [PATCH] Reduce the number of simultaneous inotify events There is no point in having a buffer capable of 512 simultaneous events, as it will typically be only 1. But increase the value for the length of the path + filename to 64 (which is a reasonable size for a typical /home/something/GNUstep/Defaults/WMRootmenu filename). --- src/event.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/event.c b/src/event.c index f770587b..0834aa91 100644 --- a/src/event.c +++ b/src/event.c @@ -298,8 +298,8 @@ void DispatchEvent(XEvent * event) * Calls wDefaultsCheckDomains if config database is updated *---------------------------------------------------------------------- */ - -#define BUFF_SIZE ((sizeof(struct inotify_event) + 16)*512) +/* allow 5 simultaneous events, with path + filenames up to 64 chars */ +#define BUFF_SIZE ((sizeof(struct inotify_event) + 64)*5) void inotifyHandleEvents(int fd, int wd) { extern void wDefaultsCheckDomains(void);