GNUnet  0.11.x
Data Fields
StringBuffer Struct Reference

String container for faster string operations. More...

Data Fields

char * sbuf
 Buffer holding the string (may start in the middle!); NOT 0-terminated! More...
 
char * abuf
 Allocated buffer. More...
 
size_t slen
 Length of the string in the buffer. More...
 
unsigned int blen
 Number of bytes allocated for sbuf. More...
 
int16_t null_flag
 Buffer currently represents "NULL" (not the empty string!) More...
 
int16_t synced
 If this entry is part of the last/current generation array, this flag is GNUNET_YES if the last and current generation are identical (and thus copying is unnecessary if the value didn't change). More...
 

Detailed Description

String container for faster string operations.

Definition at line 560 of file regex_internal.c.

Field Documentation

◆ sbuf

char* StringBuffer::sbuf

◆ abuf

char* StringBuffer::abuf

◆ slen

size_t StringBuffer::slen

◆ blen

unsigned int StringBuffer::blen

◆ null_flag

int16_t StringBuffer::null_flag

◆ synced

int16_t StringBuffer::synced

If this entry is part of the last/current generation array, this flag is GNUNET_YES if the last and current generation are identical (and thus copying is unnecessary if the value didn't change).

This is used in an optimization that improves performance by about 1% — if we use int16_t here. With just "int" for both flags, performance drops (on my system) significantly, most likely due to increased cache misses.

Definition at line 597 of file regex_internal.c.

Referenced by automaton_create_proofs_simplify().


The documentation for this struct was generated from the following file: