Skip to content

Commit ca176d4

Browse files
juancampasaghul
authored andcommitted
Fix memory usage of rt->class_count
1 parent 412c001 commit ca176d4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

quickjs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5839,7 +5839,7 @@ void JS_ComputeMemoryUsage(JSRuntime *rt, JSMemoryUsage *s)
58395839
s->malloc_limit = rt->malloc_state.malloc_limit;
58405840

58415841
s->memory_used_count = 2; /* rt + rt->class_array */
5842-
s->memory_used_size = sizeof(JSRuntime) + sizeof(JSValue) * rt->class_count;
5842+
s->memory_used_size = sizeof(JSRuntime) + sizeof(JSClass) * rt->class_count;
58435843

58445844
list_for_each(el, &rt->context_list) {
58455845
JSContext *ctx = list_entry(el, JSContext, link);

0 commit comments

Comments
 (0)