From 02de0c57d233bf969ed3971c319a96dd9f998549 Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Wed, 1 Jan 2014 23:15:47 +0200 Subject: Add new alloc metric: current_bytes_allocated. Unlike total_bytes_allocated, this tracks m_free()'s too. --- py/misc.h | 1 + 1 file changed, 1 insertion(+) (limited to 'py/misc.h') diff --git a/py/misc.h b/py/misc.h index 9f83ab526..383d3986a 100644 --- a/py/misc.h +++ b/py/misc.h @@ -32,6 +32,7 @@ void *m_realloc(void *ptr, int old_num_bytes, int new_num_bytes); void m_free(void *ptr, int num_bytes); int m_get_total_bytes_allocated(void); +int m_get_current_bytes_allocated(void); /** unichar / UTF-8 *********************************************/ -- cgit v1.2.3 From 780f555b2e36b0d468209e0ad741e8261faf63e5 Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Wed, 1 Jan 2014 23:42:21 +0200 Subject: Add new alloc metric: peak_bytes_allocated. This is just max value of current_bytes_allocated seen. --- py/misc.h | 1 + 1 file changed, 1 insertion(+) (limited to 'py/misc.h') diff --git a/py/misc.h b/py/misc.h index 383d3986a..153218ba2 100644 --- a/py/misc.h +++ b/py/misc.h @@ -33,6 +33,7 @@ void m_free(void *ptr, int num_bytes); int m_get_total_bytes_allocated(void); int m_get_current_bytes_allocated(void); +int m_get_peak_bytes_allocated(void); /** unichar / UTF-8 *********************************************/ -- cgit v1.2.3