From 2c2c55abf42fb37430329d602dcf26ed7c57e58f Mon Sep 17 00:00:00 2001 From: antoniofilipovic Date: Thu, 5 Oct 2023 09:42:10 +0200 Subject: [PATCH] test memory control --- src/memory/memory_control.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/memory/memory_control.cpp b/src/memory/memory_control.cpp index b077776ad..cd7df6f5d 100644 --- a/src/memory/memory_control.cpp +++ b/src/memory/memory_control.cpp @@ -11,6 +11,7 @@ #include "memory_control.hpp" #include +#include #include #include #include @@ -100,6 +101,17 @@ void *my_alloc(extent_hooks_t *extent_hooks, void *new_addr, size_t size, size_t return ptr; } + /* + TEST OF MEMORY TRACKER + long page_size = sysconf(_SC_PAGESIZE); + char *mem = (char*)ptr; + int i=0; + do{ + mem[i*page_size]=0; + i++; + }while(i*page_size < size); + */ + return ptr; }