Fix memory usage of rt->class_count

This commit is contained in:
Juan Campa 2024-01-29 15:43:03 -05:00 committed by Saúl Ibarra Corretgé
parent 412c0011bb
commit ca176d4e8b

View file

@ -5839,7 +5839,7 @@ void JS_ComputeMemoryUsage(JSRuntime *rt, JSMemoryUsage *s)
s->malloc_limit = rt->malloc_state.malloc_limit; s->malloc_limit = rt->malloc_state.malloc_limit;
s->memory_used_count = 2; /* rt + rt->class_array */ s->memory_used_count = 2; /* rt + rt->class_array */
s->memory_used_size = sizeof(JSRuntime) + sizeof(JSValue) * rt->class_count; s->memory_used_size = sizeof(JSRuntime) + sizeof(JSClass) * rt->class_count;
list_for_each(el, &rt->context_list) { list_for_each(el, &rt->context_list) {
JSContext *ctx = list_entry(el, JSContext, link); JSContext *ctx = list_entry(el, JSContext, link);