Hide keyboard shortcuts

Hot-keys on this page

r m x p   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

1func exit(code: i32): 

2 c"std::exit(code);" 

3 

4class Statistics: 

5 """Various application statistics. 

6 

7 """ 

8 

9 number_of_allocated_objects: u64 

10 number_of_object_decrements: u64 

11 number_of_object_frees: u64 

12 

13func statistics() -> Statistics: 

14 """Various statistics about the application. 

15 

16 """ 

17 

18 number_of_allocated_objects: u64 = 0 

19 number_of_object_decrements: u64 = 0 

20 number_of_object_frees: u64 = 0 

21 

22 c""" 

23 #ifdef MYS_MEMORY_STATISTICS 

24 number_of_allocated_objects = mys::number_of_allocated_objects; 

25 number_of_object_decrements = mys::number_of_object_decrements; 

26 number_of_object_frees = mys::number_of_object_frees; 

27 #endif 

28 """ 

29 

30 return Statistics(number_of_allocated_objects, 

31 number_of_object_decrements, 

32 number_of_object_frees) 

33 

34test statistics(): 

35 print(statistics())