diff options
author | Tobias Klauser <tklauser@distanz.ch> | 2006-11-09 22:53:12 +0100 |
---|---|---|
committer | Tobias Klauser <tklauser@xenon.tklauser.home> | 2006-11-09 22:53:12 +0100 |
commit | e3a3f534ae230670eba09264a37626932f6cd39f (patch) | |
tree | a7a8d0de95c61ac3bb920c8dcb4a3fc0e92384e1 /inotail.h | |
parent | a3f1b217c76165d4e743a01cc22692774093868d (diff) |
Dynamically allocate memory for the inotify event buffer
By using malloc(3) depending on the number of files we have, the memory
footprint can be reduced.
Before this change, the buffer size was 32 * sizeof(struct inotify_event)
which was an overhead when just tailing some few files.
Now the memory is allocated depending on the number of files to tail. I
know of no occassion where I received more than one event at a time per
file, so the '2 *' can probably be dropped too.
Diffstat (limited to 'inotail.h')
0 files changed, 0 insertions, 0 deletions