Commit 26859b32 authored by Jamie McCracken's avatar Jamie McCracken


parent a4b4926d
......@@ -7,11 +7,14 @@
* made font colour of snippet much clearer
* made snippets wrap around when resizing t-s-t
* added icon to both t-s-t and desktop file
* reduced sqlite cache usage
2006-11-18 Jamie McCracken <jamiemcc at gnome org>
* Limited tracker-extracts memory usage using setrlimit
* prevents unreasonable memory usage (especially mistaken treatment of large binary files as video files)
* fixed rdf bug where a search term without a query could not be executed
2006-11-18 Laurent Aguerreche <laurent aguerreche at free fr>
......@@ -21,11 +21,16 @@
#include <locale.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <sys/resource.h>
#include <sys/time.h>
#include <unistd.h>
#include <glib.h>
#include "config.h"
#define MAX_MEM 1
typedef enum {
......@@ -212,11 +217,21 @@ main (int argc, char **argv)
GHashTable *meta;
char *filename;
struct rlimit rl;
/* Obtain the current limits memory usage limits */
getrlimit (RLIMIT_AS, &rl);
/* Set virtual memory usage to max limit (128MB) - most extractors use mmap() so only virtual memory can be effectively limited */
rl.rlim_cur = 128*1024*1024;
if (setrlimit (RLIMIT_AS, &rl) != 0) g_printerr ("Error trying to set resource limit for tracker-extract\n");
g_set_application_name ("tracker-extract");
setlocale (LC_ALL, "");
if ((argc == 1) || (argc > 3)) {
g_print ("usage: tracker-extract file [mimetype]\n");
return 0;
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment