26 Commits

Author SHA1 Message Date
antirez
5f0d8a97bc Define HAVE_ATOMIC for clang. 2014-05-07 16:12:32 +02:00
Stam He
2fabb412ca Set proctitle: avoid the use of __attribute__((constructor)).
This cased a segfault in some Linux system and was GCC-specific.

Commit modified by @antirez:

1) Stripped away the part to set the proc title via config for now.
2) Handle initialization of setproctitle only when the replacement
   is used.
3) Don't require GCC now that the attribute constructor is no
   longer used.
2013-02-27 11:50:35 +01:00
antirez
6386d8ffc3 Set process name in ps output to make operations safer.
This commit allows Redis to set a process name that includes the binding
address and the port number in order to make operations simpler.

Redis children processes doing AOF rewrites or RDB saving change the
name into redis-aof-rewrite and redis-rdb-bgsave respectively.

This in general makes harder to kill the wrong process because of an
error and makes simpler to identify saving children.

This feature was suggested by Arnaud GRANAL in the Redis Google Group,
Arnaud also pointed me to the setproctitle.c implementation includeed in
this commit.

This feature should work on all the Linux, OSX, and all the three major
BSD systems.
2013-02-26 11:52:12 +01:00
antirez
81d284b689 Not every __sun has backtrace().
I don't know how to test for Open Solaris that has support for
backtrace() so for now removing the #ifdef that breaks compilation under
other Solaris flavors.
2013-01-21 12:06:54 +01:00
antirez
9dc3b14872 Fix config.h endianess detection to work on Linux / PPC64.
Config.h performs endianess detection including OS-specific headers to
define the endianess macros, or when this is not possible, checking the
processor type via ifdefs.

Sometimes when the OS-specific macro is included, only __BYTE_ORDER is
defined, while BYTE_ORDER remains undefined. There is code at the end of
config.h endianess detection in order to define the macros without the
underscore, but it was not working correctly.

This commit fixes endianess detection fixing Redis on Linux / PPC64 and
possibly other systems.
2012-12-11 17:01:00 +01:00
antirez
49edc56291 Use more fine grained HAVE macros instead of HAVE_PROCFS. 2012-11-21 13:17:38 +01:00
antirez
a32d1ddff6 BSD license added to every C source and header file. 2012-11-08 18:31:32 +01:00
antirez
391e60641c Marginally more robust glibc version test for sync_file_range detection. 2012-10-26 15:55:12 +02:00
charsyam
dd8475feeb patch config.h for sync_file_range 2012-10-26 04:27:58 +08:00
antirez
05a164d235 Fix compilation on Linux kernels or glibc versions lacking sync_file_range().
This fixes issue #667.

Many thanks to Didier Spezia for the fix.
2012-10-25 22:01:20 +02:00
antirez
8df82f58a6 Incrementally flush RDB on disk while loading it from a master.
This fixes issue #539.

Basically if there is enough free memory the OS may buffer the RDB file
that the slave transfers on disk from the master. The file may
actually be flused on disk at once by the operating system when it gets
closed by Redis, causing the close system call to block for a long time.

This patch is a modified version of one provided by yoav-steinberg of
@garantiadata (the original version was posted in the issue #539
comments), and tries to flush the OS buffers incrementally (every 8 MB
of loaded data).
2012-08-28 12:47:33 +02:00
Dave Pacheco
ef5aa917ae first cut at event port support 2012-05-15 11:18:54 +02:00
Pieter Noordhuis
a86a8fdcfe Everything x86 is little endian 2012-04-11 11:03:30 +02:00
Jakub Wieczorek
7f8f5ad633 Fix the build on Mac OS X, where features.h is non-existent 2012-02-26 15:13:05 +01:00
Premysl Hruby
e7e0375bd2 use gcc sync builtins for memory counter when possible 2012-02-26 11:45:52 +01:00
Pieter Noordhuis
234322a31f Solaris has backtrace(3) 2012-02-21 10:20:28 -08:00
antirez
c1162bbbe7 ZMALLOC related stuff removed from config.h. They are now defined in zmalloc.h 2011-06-20 11:35:29 +02:00
Pieter Noordhuis
d7e654bf86 Show memory allocator in INFO output 2011-05-05 16:32:18 +02:00
Pieter Noordhuis
f9ea84efcc More allocators 2011-05-05 16:25:48 +02:00
antirez
669f76304d Ehm... sorry if we don't support PDP endianess 2011-03-09 16:33:09 +01:00
antirez
ffb7345cbd byte ordering detection in config.h 2011-03-09 15:44:21 +01:00
Pieter Noordhuis
c2d7ac73e0 Exclusively use either tcmalloc or OSX's native malloc_size() 2010-10-23 10:18:48 +02:00
Pieter Noordhuis
4e16ffcbb2 Don't use prefix when malloc_size() can be called
Also, use tcmalloc functions explicitly via macros to prevent symbol
lookups to resolve to native malloc/free on OSX.
2010-10-23 09:59:28 +02:00
antirez
73db2acc37 memory fragmentation reporting in INFO also added for Mac OS X 2010-09-02 10:57:58 +02:00
antirez
eddb388ef9 memory fragmentation ratio in INFO output 2010-09-02 10:34:39 +02:00
antirez
e2641e09cc redis.c split into many different C files.
networking related stuff moved into networking.c

moved more code

more work on layout of source code

SDS instantaneuos memory saving. By Pieter and Salvatore at VMware ;)

cleanly compiling again after the first split, now splitting it in more C files

moving more things around... work in progress

split replication code

splitting more

Sets split

Hash split

replication split

even more splitting

more splitting

minor change
2010-07-01 14:38:51 +02:00