You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Fix a memory leak in hotplug2 environment handling. Bump hotplug2 to the latest svn revision, remove obsolete patches.
Memory leak is caused by the way hotplug2 handles environment variables,
using setenv() and unsetenv(). setenv() creates copies of the supplied
strings, but, due to a POSIX blunder, these copies are never destroyed
by unsetenv(), neither in glibc nor uclibc - not until the program
terminates.
Since some events are handled directly in the main process, even when
configured with the "fork" worker, hotplug2 memory usage will keep
growing over time. This can be observed by running "udevtrigger" and
noting the increase in hotplug2 VmRSS after each run.
This patch uses putenv() instead, which leaves storage management to
the caller, so that we can explicitly delete stuff when it's no longer
needed.
Signed-off-by: Aleksandar Radovanovic <biblbroks@sezampro.rs>
SVN-Revision: 18725
15 years ago
|
|
|
diff -Naur a/common.mak b/common.mak
|
|
|
|
--- a/common.mak 2009-11-18 13:15:21.000000000 +0000
|
|
|
|
+++ b/common.mak 2009-11-18 13:25:18.000000000 +0000
|
|
|
|
@@ -1,7 +1,7 @@
|
|
|
|
# vim:set sw=8 nosta:
|
|
|
|
|
Fix a memory leak in hotplug2 environment handling. Bump hotplug2 to the latest svn revision, remove obsolete patches.
Memory leak is caused by the way hotplug2 handles environment variables,
using setenv() and unsetenv(). setenv() creates copies of the supplied
strings, but, due to a POSIX blunder, these copies are never destroyed
by unsetenv(), neither in glibc nor uclibc - not until the program
terminates.
Since some events are handled directly in the main process, even when
configured with the "fork" worker, hotplug2 memory usage will keep
growing over time. This can be observed by running "udevtrigger" and
noting the increase in hotplug2 VmRSS after each run.
This patch uses putenv() instead, which leaves storage management to
the caller, so that we can explicitly delete stuff when it's no longer
needed.
Signed-off-by: Aleksandar Radovanovic <biblbroks@sezampro.rs>
SVN-Revision: 18725
15 years ago
|
|
|
COPTS=-Os -Wall -g
|
|
|
|
-LDFLAGS=-g -ldl
|
|
|
|
+LDFLAGS=-g
|
|
|
|
|
Fix a memory leak in hotplug2 environment handling. Bump hotplug2 to the latest svn revision, remove obsolete patches.
Memory leak is caused by the way hotplug2 handles environment variables,
using setenv() and unsetenv(). setenv() creates copies of the supplied
strings, but, due to a POSIX blunder, these copies are never destroyed
by unsetenv(), neither in glibc nor uclibc - not until the program
terminates.
Since some events are handled directly in the main process, even when
configured with the "fork" worker, hotplug2 memory usage will keep
growing over time. This can be observed by running "udevtrigger" and
noting the increase in hotplug2 VmRSS after each run.
This patch uses putenv() instead, which leaves storage management to
the caller, so that we can explicitly delete stuff when it's no longer
needed.
Signed-off-by: Aleksandar Radovanovic <biblbroks@sezampro.rs>
SVN-Revision: 18725
15 years ago
|
|
|
CFLAGS=$(COPTS)
|
|
|
|
FPIC=-fPIC
|
|
|
|
diff -Naur a/Makefile b/Makefile
|
|
|
|
--- a/Makefile 2009-11-18 13:15:21.000000000 +0000
|
|
|
|
+++ b/Makefile 2009-11-18 13:25:18.000000000 +0000
|
|
|
|
@@ -40,5 +40,6 @@
|
|
|
|
CFLAGS += -DSTATIC_WORKER=1
|
|
|
|
else
|
|
|
|
CFLAGS += $(FPIC)
|
|
|
|
+ LDFLAGS += -ldl
|
|
|
|
endif
|
|
|
|
|