cwist
Modern C web framework with libttak runtime
Loading...
Searching...
No Matches
cwist_fix_server_mem Struct Reference

Fixed Server Memory Manager. More...

#include <app.h>

Collaboration diagram for cwist_fix_server_mem:

Public Attributes

size_t total_capacity
 Total capacity (defaults to sum of files * 2)
 
size_t current_used
 Bytes accounted for by active files.
 
cwist_file_t * files
 Array of tracked files.
 
size_t file_count
 
size_t files_capacity
 Capacity of the files array.
 
uint64_t retire_grace_ns
 Delay before recycling replaced buffers.
 
ttak_mem_tree_t file_tree
 Lifetime tracking tree for file buffers.
 
pthread_mutex_t lock
 
pthread_t watcher_thread
 
bool watcher_running
 
int check_interval_ms
 

Detailed Description

Fixed Server Memory Manager.

Pre-allocates a large contiguous block of memory to serve static files via Zero-Copy pointer passing. Supports hot-reloading on file change.

Definition at line 247 of file app.h.

Member Data Documentation

◆ check_interval_ms

int cwist_fix_server_mem::check_interval_ms

Definition at line 261 of file app.h.

◆ current_used

size_t cwist_fix_server_mem::current_used

Bytes accounted for by active files.

Definition at line 249 of file app.h.

◆ file_count

size_t cwist_fix_server_mem::file_count

Definition at line 252 of file app.h.

Referenced by cwist_app_destroy().

◆ file_tree

ttak_mem_tree_t cwist_fix_server_mem::file_tree

Lifetime tracking tree for file buffers.

Definition at line 256 of file app.h.

Referenced by cwist_app_destroy().

◆ files

cwist_file_t* cwist_fix_server_mem::files

Array of tracked files.

Definition at line 251 of file app.h.

Referenced by cwist_app_destroy().

◆ files_capacity

size_t cwist_fix_server_mem::files_capacity

Capacity of the files array.

Definition at line 253 of file app.h.

◆ lock

pthread_mutex_t cwist_fix_server_mem::lock

Definition at line 258 of file app.h.

Referenced by cwist_app_destroy().

◆ retire_grace_ns

uint64_t cwist_fix_server_mem::retire_grace_ns

Delay before recycling replaced buffers.

Definition at line 255 of file app.h.

◆ total_capacity

size_t cwist_fix_server_mem::total_capacity

Total capacity (defaults to sum of files * 2)

Definition at line 248 of file app.h.

◆ watcher_running

bool cwist_fix_server_mem::watcher_running

Definition at line 260 of file app.h.

Referenced by cwist_app_destroy().

◆ watcher_thread

pthread_t cwist_fix_server_mem::watcher_thread

Definition at line 259 of file app.h.

Referenced by cwist_app_destroy().


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