HawkTracer  0.10.0
memory_usage.h
Go to the documentation of this file.
1 #ifndef HAWKTRACER_MEMORY_USAGE_H
2 #define HAWKTRACER_MEMORY_USAGE_H
3 
5 #include <hawktracer/ht_config.h>
6 
7 #ifdef HT_PLATFORM_FEATURE_MEMORY_USAGE_ENABLED
8 
10 
13 #define HT_MEMORY_USAGE_INVALID_VALUE ((size_t)-1)
14 
17 typedef struct _HT_MemoryUsageContext HT_MemoryUsageContext;
18 
33 
40 
67  size_t* virtual_memory_bytes,
68  size_t* shared_memory_bytes,
69  size_t* resident_memory_bytes);
70 
72 
73 #endif /* HT_PLATFORM_FEATURE_MEMORY_USAGE_ENABLED */
74 
75 #endif /* HAWKTRACER_MEMORY_USAGE_H */
#define HT_API
Defines a directive for exporting/importing symbols from DLL.
Definition: macros.h:76
#define HT_DECLS_END
Defines an end of C linkage block.
Definition: macros.h:17
struct _HT_MemoryUsageContext HT_MemoryUsageContext
A forward declaration for memory usage context.
Definition: memory_usage.h:17
HT_ErrorCode
Defines list of possible errors returned by library functions.
Definition: base_types.h:48
HT_API HT_ErrorCode ht_memory_usage_get_usage(HT_MemoryUsageContext *context, size_t *virtual_memory_bytes, size_t *shared_memory_bytes, size_t *resident_memory_bytes)
Gets a memory usage of the process in kilobytes.
HT_API void ht_memory_usage_context_destroy(HT_MemoryUsageContext *context)
Destroys memory context.
#define HT_DECLS_BEGIN
Defines a beginning of C linkage block.
Definition: macros.h:16
HT_API HT_MemoryUsageContext * ht_memory_usage_context_create(void *process_id)
Creates a context for a memory usage feature.