~ubuntu-branches/debian/stretch/haproxy/stretch

« back to all changes in this revision

Viewing changes to include/common/memory.h

  • Committer: Package Import Robot
  • Author(s): Apollon Oikonomopoulos
  • Date: 2014-06-20 11:05:17 UTC
  • mfrom: (1.1.15) (15.1.12 experimental)
  • Revision ID: package-import@ubuntu.com-20140620110517-u6q5p9kyy2f3ozw9
Tags: 1.5.0-1
* New upstream stable series. Notable changes since the 1.4 series:
  + Native SSL support on both sides with SNI/NPN/ALPN and OCSP stapling.
  + IPv6 and UNIX sockets are supported everywhere
  + End-to-end HTTP keep-alive for better support of NTLM and improved
    efficiency in static farms
  + HTTP/1.1 response compression (deflate, gzip) to save bandwidth
  + PROXY protocol versions 1 and 2 on both sides
  + Data sampling on everything in request or response, including payload
  + ACLs can use any matching method with any input sample
  + Maps and dynamic ACLs updatable from the CLI
  + Stick-tables support counters to track activity on any input sample
  + Custom format for logs, unique-id, header rewriting, and redirects
  + Improved health checks (SSL, scripted TCP, check agent, ...)
  + Much more scalable configuration supports hundreds of thousands of
    backends and certificates without sweating

* Upload to unstable, merge all 1.5 work from experimental. Most important
  packaging changes since 1.4.25-1 include:
  + systemd support.
  + A more sane default config file.
  + Zero-downtime upgrades between 1.5 releases by gracefully reloading
    HAProxy during upgrades.
  + HTML documentation shipped in the haproxy-doc package.
  + kqueue support for kfreebsd.

* Packaging changes since 1.5~dev26-2:
  + Drop patches merged upstream:
    o Fix-reference-location-in-manpage.patch
    o 0001-BUILD-stats-workaround-stupid-and-bogus-Werror-forma.patch
  + d/watch: look for stable 1.5 releases
  + systemd: respect CONFIG and EXTRAOPTS when specified in
    /etc/default/haproxy.
  + initscript: test the configuration before start or reload.
  + initscript: remove the ENABLED flag and logic.

Show diffs side-by-side

added added

removed removed

Lines of Context:
39
39
                __p = malloc(((__len) >= sizeof (void *)) ? \
40
40
                      (__len) : sizeof(void *));            \
41
41
        else {                                              \
42
 
                __pool = *(void **)(__pool);                \
 
42
                (__pool) = *(void **)(__pool);              \
43
43
        }                                                   \
44
44
        __p;                                                \
45
45
})
87
87
 */
88
88
#define pool_free(type, ptr)                            \
89
89
({                                                      \
90
 
        *(void **)ptr = (void *)pool_##type;            \
91
 
        pool_##type = (void *)ptr;                      \
 
90
        *(void **)(ptr) = (void *)pool_##type;          \
 
91
        pool_##type = (void *)(ptr);                    \
92
92
})
93
93
 
94
94
#else
129
129
        char name[12];          /* name of the pool */
130
130
};
131
131
 
 
132
/* poison each newly allocated area with this byte if not null */
 
133
extern char mem_poison_byte;
132
134
 
133
135
/* Allocate a new entry for pool <pool>, and return it for immediate use.
134
136
 * NULL is returned if no memory is available for a new creation.
143
145
 
144
146
/* Dump statistics on pools usage.
145
147
 */
 
148
void dump_pools_to_trash();
146
149
void dump_pools(void);
147
150
 
148
151
/*
171
174
#define pool_alloc2(pool)                                       \
172
175
({                                                              \
173
176
        void *__p;                                              \
174
 
        if ((__p = pool->free_list) == NULL)                    \
 
177
        if ((__p = (pool)->free_list) == NULL)                  \
175
178
                __p = pool_refill_alloc(pool);                  \
176
179
        else {                                                  \
177
 
                pool->free_list = *(void **)pool->free_list;    \
178
 
                pool->used++;                                   \
 
180
                (pool)->free_list = *(void **)(pool)->free_list;\
 
181
                (pool)->used++;                                 \
179
182
        }                                                       \
180
183
        __p;                                                    \
181
184
})
192
195
#define pool_free2(pool, ptr)                           \
193
196
({                                                      \
194
197
        if (likely((ptr) != NULL)) {                    \
195
 
                *(void **)ptr = (void *)pool->free_list;\
196
 
                pool->free_list = (void *)ptr;          \
197
 
                pool->used--;                           \
 
198
                *(void **)(ptr) = (void *)(pool)->free_list;    \
 
199
                (pool)->free_list = (void *)(ptr);      \
 
200
                (pool)->used--;                         \
198
201
        }                                               \
199
202
})
200
203