suricata
app-layer-htp-mem.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void HTPParseMemcap (void)
 
void * HTPMalloc (size_t size)
 
void * HTPCalloc (size_t n, size_t size)
 
void * HTPRealloc (void *ptr, size_t orig_size, size_t size)
 
void HTPFree (void *ptr, size_t size)
 
int HTPSetMemcap (uint64_t size)
 Update memcap value. More...
 
uint64_t HTPGetMemcap (void)
 Update memcap value. More...
 
uint64_t HTPMemuseGlobalCounter (void)
 
uint64_t HTPMemcapGlobalCounter (void)
 

Detailed Description

Memory management functions for HTP in the application layer

Definition in file app-layer-htp-mem.h.

Function Documentation

◆ HTPCalloc()

void* HTPCalloc ( size_t  n,
size_t  size 
)

Definition at line 152 of file app-layer-htp-mem.c.

Referenced by HtpBodyAppendChunk().

Here is the caller graph for this function:

◆ HTPFree()

void HTPFree ( void *  ptr,
size_t  size 
)

Definition at line 189 of file app-layer-htp-mem.c.

References SCFree.

Referenced by HtpBodyAppendChunk(), HtpBodyFree(), and HtpBodyPrune().

Here is the caller graph for this function:

◆ HTPGetMemcap()

uint64_t HTPGetMemcap ( void  )

Update memcap value.

Return values
memcapvalue

Definition at line 129 of file app-layer-htp-mem.c.

References SC_ATOMIC_GET.

◆ HTPMalloc()

void* HTPMalloc ( size_t  size)

Definition at line 135 of file app-layer-htp-mem.c.

◆ HTPMemcapGlobalCounter()

uint64_t HTPMemcapGlobalCounter ( void  )

Definition at line 89 of file app-layer-htp-mem.c.

References SC_ATOMIC_GET.

Referenced by AppLayerRegisterGlobalCounters().

Here is the caller graph for this function:

◆ HTPMemuseGlobalCounter()

uint64_t HTPMemuseGlobalCounter ( void  )

Definition at line 83 of file app-layer-htp-mem.c.

References SC_ATOMIC_GET.

Referenced by AppLayerRegisterGlobalCounters().

Here is the caller graph for this function:

◆ HTPParseMemcap()

void HTPParseMemcap ( void  )

set config values for memcap, prealloc and hash_size

Definition at line 43 of file app-layer-htp-mem.c.

References ConfGet(), ParseSizeStringU64(), SC_ATOMIC_GET, SC_ATOMIC_INIT, SC_ATOMIC_SET, SCLogError, and SCLogInfo.

Here is the call graph for this function:

◆ HTPRealloc()

void* HTPRealloc ( void *  ptr,
size_t  orig_size,
size_t  size 
)

Definition at line 169 of file app-layer-htp-mem.c.

◆ HTPSetMemcap()

int HTPSetMemcap ( uint64_t  size)

Update memcap value.

Parameters
sizenew memcap value

Definition at line 115 of file app-layer-htp-mem.c.

References SC_ATOMIC_GET, and SC_ATOMIC_SET.