Fix the windows build.
git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@3926 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
parent
7f350a3d87
commit
a154b1c2f6
@ -625,10 +625,12 @@ static int _tf_command_usage(const char* file, int argc, char* argv[])
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if !defined(_WIN32)
|
||||||
static void _do_leak_checks(int sig)
|
static void _do_leak_checks(int sig)
|
||||||
{
|
{
|
||||||
VALGRIND_DO_LEAK_CHECK;
|
VALGRIND_DO_LEAK_CHECK;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
int main(int argc, char* argv[])
|
int main(int argc, char* argv[])
|
||||||
{
|
{
|
||||||
|
@ -722,8 +722,10 @@ static JSValue _tf_task_getStats(JSContext* context, JSValueConst this_val, int
|
|||||||
JS_SetPropertyStr(context, result, "tls_malloc_percent", JS_NewFloat64(context, 100.0f * tf_mem_get_tls_malloc_size() / total_memory));
|
JS_SetPropertyStr(context, result, "tls_malloc_percent", JS_NewFloat64(context, 100.0f * tf_mem_get_tls_malloc_size() / total_memory));
|
||||||
JS_SetPropertyStr(context, result, "tf_malloc_percent", JS_NewFloat64(context, 100.0f * tf_mem_get_tf_malloc_size() / total_memory));
|
JS_SetPropertyStr(context, result, "tf_malloc_percent", JS_NewFloat64(context, 100.0f * tf_mem_get_tf_malloc_size() / total_memory));
|
||||||
|
|
||||||
|
#if !defined(_WIN32)
|
||||||
struct mallinfo mi = mallinfo();
|
struct mallinfo mi = mallinfo();
|
||||||
JS_SetPropertyStr(context, result, "arena_percent", JS_NewFloat64(context, 100.0f * mi.arena / total_memory));
|
JS_SetPropertyStr(context, result, "arena_percent", JS_NewFloat64(context, 100.0f * mi.arena / total_memory));
|
||||||
|
#endif
|
||||||
|
|
||||||
JS_SetPropertyStr(context, result, "socket_count", JS_NewInt32(context, tf_socket_get_count()));
|
JS_SetPropertyStr(context, result, "socket_count", JS_NewInt32(context, tf_socket_get_count()));
|
||||||
JS_SetPropertyStr(context, result, "socket_open_count", JS_NewInt32(context, tf_socket_get_open_count()));
|
JS_SetPropertyStr(context, result, "socket_open_count", JS_NewInt32(context, tf_socket_get_open_count()));
|
||||||
|
Loading…
Reference in New Issue
Block a user