Enumerations | |
enum | errorcode { ERR_NONE = 0, ERR_NO_MEM } |
Functions | |
void * | _stp_alloc (size_t len) |
Allocates memory within a probe. | |
void * | _stp_calloc (size_t len) |
Allocates and clears memory within a probe. | |
void * | _stp_valloc (size_t len) |
Allocates and clears memory outside a probe. | |
void | _stp_free (void *ptr) |
Frees memory allocated by _stp_alloc or _stp_calloc. | |
void | _stp_vfree (void *ptr) |
Frees memory allocated by _stp_valloc. | |
Variables | |
enum errorcode | _stp_error = ERR_NONE |
These will be changed so that memory allocation errors will call a handler. The default will send a signal to the user-space daemon that will trigger the module to be unloaded.
|
Allocates memory within a probe. This is used for small allocations from within a running probe where the process cannot sleep.
Definition at line 31 of file alloc.c. Referenced by _stp_calloc(), and _stp_map_set_str(). |
|
Allocates and clears memory within a probe. This is used for small allocations from within a running probe where the process cannot sleep.
Definition at line 47 of file alloc.c. References _stp_alloc(). Referenced by _stp_map_set_stat(), and _stp_map_set_str(). |
|
Frees memory allocated by _stp_alloc or _stp_calloc.
Definition at line 76 of file alloc.c. Referenced by _stp_list_clear(), _stp_map_key_del(), and _stp_map_set_str(). |
|
Allocates and clears memory outside a probe. This is typically used in the module initialization to allocate new maps, lists, etc.
Definition at line 62 of file alloc.c. Referenced by _stp_map_new(). |
|
Frees memory allocated by _stp_valloc.
Definition at line 86 of file alloc.c. Referenced by _stp_map_del(). |