As a web developer/programmer, I always need to know about the memory limits and memory usage. After some searches I found that it seems that there is no a specific way to know memory usage by a website, or function but I found some codes that helps to know about heap memory limit and memory usage.
The advice of experts is to use max. 50MB in desktop versions and 20MB in mobile.
By writing these codes on chrome console, can have these numbers.
and to know how much are you currently using, try this:
for example, in my system, heap size limit is almost 2.18GB
and heap memory usage for an array of simple object in json format with 100K items, takes almost 32MB