Commit Graph

7 Commits (e99063b6b8079d053dce4648da370b6d686dc9d9)

Author SHA1 Message Date
Giuseppe Longo 7addc24566 htp: destroy atomic vars
Atomic vars declared in app-layer-htp-mem.c were not
destroyed when suricata is shutdown.
7 years ago
Giuseppe Longo 85ddeb3afa htp: get/set memcap value
This adds new functions that will be called
through unix-socket and permit to update
and show memcap value.

The memcap value needs to be handled in a
thread safe way, so for this reason it is
declared as atomic var.
7 years ago
Victor Julien ab1200fbd7 compiler: more strict compiler warnings
Set flags by default:

    -Wmissing-prototypes
    -Wmissing-declarations
    -Wstrict-prototypes
    -Wwrite-strings
    -Wcast-align
    -Wbad-function-cast
    -Wformat-security
    -Wno-format-nonliteral
    -Wmissing-format-attribute
    -funsigned-char

Fix minor compiler warnings for these new flags on gcc and clang.
8 years ago
Victor Julien 77f67062de htp: add HTPCalloc wrapper 9 years ago
Victor Julien cddbb0f606 http: make http.memuse a global counter
http.memcap as well.
10 years ago
Eric Leblond d6d8a08a8f htp layer: add memory usage counter
This patch adds a memory counter for HTP memory usage. As
there is no thread variables available in application layer
the counter has been added to the TCP reassembly thread.
11 years ago
Eric Leblond ced01da822 htp layer: use memcap for HTTP related allocations
This patch introduces wrapper functions around allocation functions
to be able to have a global HTP memcap. A simple subsitution of
function was not enough because allocated size needed to be known
during freeing and reallocation.

The value of the memcap can be set in the YAML and is left by default
to unlimited (0) to avoid any surprise to users.
11 years ago